Replies
Hi Brajesh, thanks for confirming that. A couple of other things I’m unclear on. Is this only role based or can I manually assign badges to individuals? And where is the interface for doing this? Is it done under Users in the back-end? I couldn’t work this out from your screen shots.
Thanks.
Hi Brajesh,
We’re almost there. The link you provided worked (for some reason I had to put it in my functions file, not bp-custom, to make it work), but only when the Profiles tab is displaying because it jumps from the Settings tab to the Profile tab to bring up the image upload window. However I want to hide the Profiles tab altogether with this code:
function vap_remove_buddypress_profile_tabs() { global $bp; // to remove main menu like friends. bp_core_remove_nav_item('profile' ); // to remove sub nav favorites under activity. bp_core_remove_subnav_item('activity', 'favorites'); } add_action( 'bp_setup_nav', 'vap_remove_buddypress_profile_tabs', 999 );
When I remove the Profiles tab Buddypress doesn’t know where to go after clicking ‘change photos’ when in the Settings tab.
OK, I copied some code from the web which created an activity link in the Activity tab. I’ve changed what I can so the submenu appears in the Settings tab instead, but I need to change the ‘screen function’ and the ‘link’ part to point to the Change Image page. Any pointers?
function bpfr_custom_profile_sub_nav() { global $bp; $parent_slug = 'settings'; //Add subnav item bp_core_new_subnav_item( array( 'name' => __( 'Change Photo' ), 'slug' => $parent_slug, 'parent_url' => $bp->loggedin_user->domain . $parent_slug.'/', 'parent_slug' => $parent_slug, 'screen_function' => 'bp_activity_screen_my_activity', 'position' => 60, 'link' => bp_get_activity_directory_permalink(), ) ); } add_action( 'bp_setup_nav', 'bpfr_custom_profile_sub_nav' );
Hi Ravi. Is this any different from my post the other day about adding custom links to the BuddyPress menu (https://buddydev.com/support/forums/topic/add-new-link-to-the-buddypress-member-profile-page/)?
Or are you suggesting echoing the content of the account page by changing the echo here to page id?
* Display content on tab. */ function buddydev_custom_screen_content() { echo 'hello BuddyDev'; }