Note: overloading and / or adding templates from plugins can be quite complex. For more detailed discussion and examples, please see: Upgrading older plugins that bundle custom templates for BP 1.7 Using BP Theme Compat in Plugins The purpose of this page is to provide a simple example of overloading an existing template part. If […]
Template Overload from a Plugin
Published on May 22nd, 2014 by shanebpUsing bp_parse_args() to filter BuddyPress template loops
Published on April 16th, 2014 by r-a-yPrologue In the past, it has been extremely difficult to filter any BuddyPress template loop. For example, let’s say I wanted all activity loops to show the last five entries instead of the default of 20. It was possible, but basically you’d either have to requery the activity loop to grab the last five entries […]
Playing with the user’s ID in different contexts
Published on November 23rd, 2013 by imathBuddyPress Core is first taking care of the members. As a result, when you write a BuddyPress plugin, there is a very good chance that you’ve got to play with the finest element identifying the users : their ID. There are two scenarios: the logged in user and the user whose profile is displayed. Thankfully, […]
bp_get_template_part()
Published on February 28th, 2013 by @modemlooperUse bp_get_template_part() when you want to filter a BuddyPress template part. You will need to pass your function three arguments ( $templates, $slug, $name ). The example below will swap out the activity.php template part when that template part is called. If you do not supply a $slug, it will swap out every template part […]
bp_get_the_profile_field_value()
Published on December 17th, 2012 by @modemlooperProfile fields have a filter that adds a link to certain words that are used to search members with. To remove this filter:
bp_ajax_querystring()
Published on December 4th, 2012 by @modemlooperYou can filter the output of the Activity loop using bp_ajax_querystring. Read about other queries you can pass the activity stream and learn more about the Activity loop here. To filter ajax: