Last active
December 19, 2015 12:39
-
-
Save javierarques/5956890 to your computer and use it in GitHub Desktop.
Pagination on Buddypress Components. Buddypress pagination. Buddypress rewrite rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bp_component_screen_controller() { | |
global $bp; | |
//Are we in the current type | |
if ( $bp->current_component == BP_YOUR_COMPONENT_SLUG ) { | |
// The directory. | |
if ( (empty( $bp->current_action ) || ($bp->current_action == 'page')) && | |
(empty( $bp->action_variables ) || is_numeric($bp->action_variables[0]))) { | |
// LOAD TEMPLATE | |
// add_action( 'bp_template_content', 'your_component_content' ); | |
// add_action( 'bp_template_title', 'your_component_title'); | |
// bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); | |
} | |
} | |
} | |
add_action( 'wp', 'bp_component_screen_controller' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment