adding shortcodes to members header from a different plugin
Hello. I am currently trying to combine buddypress with some of the functionality/options of a plugin called userpro. Userpro is completely done with shortcodes. My goal is to add the profile options from a shortcode to the members-header.php, so that when a user visits their profile or someone elses profile,they still see all of the cool tabs provided by buddypress, but the header is changed to the header that exists from using the shortcode. Ive tried to research past topics regarding the members-header.php, but have only recently figured out that shortcodes aren’t parsed with bp. However, I saw a post briefly explain that in order to add shortcodes to .php files, i have to add a filter to a function. So, i was wondering if anyone could guide me to the members-header function (or the correct function for that matter) and/or the correct filter to add to this function…? I think it will or is supposed to look something like this :
$field_text = bp_get_profile_field_data( ‘field=Country’ ) );
echo ‘<span class=”profile-fields”>’ .$field_text. ‘</span>’;
add_action( ‘bp_profile_header_meta’, ‘extra_profile_fields_output’ )
If anyone can either explain or guide me to a tutorial that can help me understand how to allow shortcodes in the buddypress template files, I would greatly appreciate any insight. I apologize in advance for any of the above being not clear or sounding ignorant. I am new, and Im just trying to learn as i go. I understand where to find the template files, I just dont understand how to create the proper function/filter that would provide the needed functionality, even if its just an example, I can atleast play around from there. I figure the more I break it, the more im learning anyway right? Thanks in advance.
- The topic ‘adding shortcodes to members header from a different plugin’ is closed to new replies.