-
Hardeep Asrani replied to the topic [Resolved] xProfile field being created with every reload in the forum Creating & Extending 10 years, 4 months ago
Amazing!!
Where’s the mark as resolved or close the topic option?
Or maybe adding a tag would do that? Let me try…
-
Hardeep Asrani replied to the topic [Resolved] xProfile field being created with every reload in the forum Creating & Extending 10 years, 4 months ago
Okay, it worked!!! That’s a lot!!
One more thing – can you please tell me what if it’s in the functions.php file, do I need to use the bp_init then or something else?
-
Hardeep Asrani replied to the topic [Resolved] xProfile field being created with every reload in the forum Creating & Extending 10 years, 4 months ago
That’s not what I’m looking for.
-
Hardeep Asrani replied to the topic [Resolved] xProfile field being created with every reload in the forum Creating & Extending 10 years, 4 months ago
Because I’m trying to create a plugin out of it.
-
Hardeep Asrani started the topic [Resolved] xProfile field being created with every reload in the forum Creating & Extending 10 years, 4 months ago
I’m using following snippet to create xProfile fields in a custom plugin:
`
add_action(‘bp_init’, ‘field_xprofile_twitter’);function field_xprofile_twitter()
{
global $wpdb;
xprofile_insert_field(
array (
field_group_id => 1,
name => ‘WWWYKI’,
can_delete => false, // Doesn’t work *…[Read more] -
Hardeep Asrani replied to the topic Overrding BuddyPress files in the forum Creating & Extending 10 years, 7 months ago
Here’s how it looks like a plugin: https://sites.google.com/site/hardeepasrani/bp-plugin-override.zip?attredirects=0&d=1
Hope you can help with this…Thanks!
-
Hardeep Asrani replied to the topic Overrding BuddyPress files in the forum Creating & Extending 10 years, 7 months ago
And it will be like
pluginfolder/pluginfile.php
? Or something else? -
Hardeep Asrani replied to the topic Overrding BuddyPress files in the forum Creating & Extending 10 years, 7 months ago
Would I have to do any modifications on your code, and the plugin structure will be like:
my-plugin/buddypress/members/single/member-header.php
??
Thanks for the help 🙂
-
Hardeep Asrani started the topic Overrding BuddyPress files in the forum Creating & Extending 10 years, 7 months ago
I’m trying to override following file from BuddyPress core:
/bp-templates/bp-legacy/buddypress/members/single/member-header.php
in my custom plugin, by adding it as:
my-plugin/buddypress/bp-templates/bp-legacy/buddypress/members/single/member-header.php
and it’s not working. Am I doing it right? Or is there something missing or I need to add…[Read more]
-
Hardeep Asrani replied to the topic Creating xProfiles using functions.php in the forum Creating & Extending 10 years, 7 months ago
This isn’t doing the job either:
function field_xprofile_twitter()
{$group_args = array(
'name' => 'Social Networks'
);
$group_id = xprofile_insert_field_group( $group_args ); // group's IDxprofile_insert_field( $xfield_args );
$xfield_args = array (
field_group_id => $group_id,
name => 'Twitter',…[Read more] -
Hardeep Asrani replied to the topic Creating xProfiles using functions.php in the forum Creating & Extending 10 years, 7 months ago
I used the following code, and it’s not doing the job:
function field_xprofile_twitter()
{$group_args = array(
'name' => 'Social Networks'
);
$group_id = xprofile_insert_field_group( $group_args ); // group's IDxprofile_insert_field(
array (
field_group_id => $group_id,
name => 'Twitter',…[Read more] -
Hardeep Asrani replied to the topic Creating xProfiles using functions.php in the forum Creating & Extending 10 years, 7 months ago
Thanks for passing the info 🙂
-
Hardeep Asrani started the topic Creating xProfiles using functions.php in the forum Creating & Extending 10 years, 7 months ago
I wanted to create a function which will automatically add a xProfile field. Is it possible to do it using a custom plugin or functions.php?
@hardeepasrani
Active 1 week, 3 days ago