Problem adding shortcode into buddypress menú
-
Hello,
i need to add Members-grid page with filters and all things into buddypress tabs.
To do it I’m using INCLUDEME plugin to add php file like shortcode. My code is this one:
/* MEMBERS GRID SECTION */
add_action(‘bp_setup_nav’, ‘mb_bp_profile_menu_posts’, 301 );
function mb_bp_profile_menu_posts() {
global $bp;bp_core_new_nav_item(
array(
‘name’ => ‘Members Grid’,
‘slug’ => ‘members_grid’,
‘position’ => 1,
‘default_subnav_slug’ => ‘published’, // We add this submenu item below
‘screen_function’ => ‘mb_manage_members_grid’
)
);
}function mb_manage_members_grid(){
add_action( ‘bp_template_content’, ‘mb_show_members_grid’ );
bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );
}function mb_show_members_grid() {
echo do_shortcode(‘[includeme file=”‘.MEMBERSGRIDFILE.'”]’);
}where MEMBERSGRIDFILE is path of index.php file of member-loop.php into /plugins/buddypress/bp-templates/bp-legacy/buddypress/members.
I can show all ok but pagesnumber links or link to search not working … But If i open links into external tab o page they working fine. I don’t understand. Console error is:
admin-ajax: Failed to load resource: the server responded with a status of 400 ()
If I use this shortcode into a normal wordpress page it’s working ok so this error is about buddypress integration.
Some help?
Thank you.
- You must be logged in to reply to this topic.