-
Author
Tagged: sweetdate, buddypress
-
April 28, 2015 at 05:20 #56401RicardoParticipant
I’ve persistently been in the web in search of a function to reorder the activity subnav (Personal, Mentions Favorites, Friends, Groups) and I could not find any that works, even on Buddypress forum. I would be grateful if you help me to find a solution for this.
May 1, 2015 at 16:48 #56953LauraModeratorHello, please check out https://buddypress.org/support/topic/re-order-subnav-tabs-in-profile-page/ let me know if its helpfull 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
May 1, 2015 at 20:07 #56976RicardoParticipantThanks Laura, yes, I have previously seen this topic on Buddypress Forum, however, the only working solution provided on it is through editing the core code of Buddypress (specifically the function setup_nav()) in /buddypress/bp-activity/bp-activity-loader.php.
I wonder if there is a way to do this adding code to the theme’s function.php file.
R.
May 2, 2015 at 00:54 #56990RicardoParticipantAll right, after many trial and errors, I got it! As example, moving the subnav “Favorites” to the last position:
COPY CODEfunction custom_bp_subnav_order() { global $bp; $domain = bp_displayed_user_domain() ? bp_displayed_user_domain() : bp_loggedin_user_domain(); bp_core_new_subnav_item( array( 'name' => _x( 'Favorites', 'Profile activity screen sub nav', 'buddypress' ), 'slug' => 'favorites', 'parent_url' => trailingslashit( $domain . bp_get_activity_slug() ), 'parent_slug' => bp_get_activity_slug(), 'screen_function' => 'bp_activity_screen_favorites', 'position' => 99, 'item_css_id' => 'activity-favs' ) ); } add_action( 'bp_setup_nav', 'custom_bp_subnav_order', 999 );
Add it to the child theme’s function.php.
Check function setup_nav() in /buddypress/bp-activity/bp-activity-loader.php to get the data for other subnav’s.
R.
May 4, 2015 at 16:33 #57201LauraModeratorAwesome! 😀
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
-
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.