Understanding bp_core_load_template
-
I’m trying to understand what’s happening with the bp_core_load_template function. It’s working for a new subpage on a profile page, but I’d like to get it working under the group.
Here’s the code I use for the profile page that works fine, but I’d like to learn what it’s really doing:
function display_plugin_page() {
add_action( ‘bp_template_content’, ‘display_content_for_this_page’ );
bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );
}Can anyone tell me what this code is doing? Why does it work for a profile page and not a group page? Also, I saw some reference to locate_template which sounds like it might do some similar things, but for custom templates?
Shouldn’t I just be able to use the following display function in the group API for the new page to display what’s in the function display_content_for_this_page()?
function display() {
add_action( ‘bp_template_content’, ‘display_content_for_this_page’ );
bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘groups/single/plugins’ ) );
}
- The topic ‘Understanding bp_core_load_template’ is closed to new replies.