Support » Plugin: BuddyPress Album » [Plugin: BuddyPress Album] How are templates selected

  • Hi – I can’t quite see how bp-albumn determines which template file to use.

    For example – navigating to /wordpress/members/admin/album/ results in the wordpress/wp-content/plugins/bp-album/includes/ templates/album/pictures.php template being used.

    I can’t determine where it works out that this is the filter, and then how it tells WP or BP that this is the one that should be use.

    Any tips on how I should investigate this will be appreciated.

    I’ve seen the below comment in the readme, but don’t know where the examples it is referring to are located.

    “For more information, see the functions bp_example_load_template_filter() for how template locations
    are filtered, and bp_example_screen_one() for how they are loaded for a screen (all in bp-example-core.php)”


Viewing 1 replies (of 1 total)
  • I have made some progress on this.

    A simple skeleton component (component being a buddypress plugin) is given at

    A plugin needs to extend BP_Component, and will during its construction include a list of files.

    Filters can be added to “bp_located_template” – and in the skeleton example there is the below code which is the start of selecting a custom template for a specific URI

    * Only filter the template location when we’re on the example component pages.
    if ( $bp->current_component != $bp->example->slug )

    Haven’t quite been able to been able to work out exactly how bp-albumn is doing this, but prob along the same lines.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: BuddyPress Album] How are templates selected’ is closed to new replies.