-
Author
-
October 17, 2013 at 12:55 #4565gideon1210Participant
Under the profile tab how do you remove the view section
October 18, 2013 at 03:12 #4579adamParticipantI assume it can be done like they show here: http://wpmu.org/daily-tip-how-to-remove-mentions-from-buddypress/ (which was something I wanted to do).
I’ve tried adding this to functions.php:
function ray_remove_view_nav() {
global $bp;bp_core_remove_subnav_item( $bp->profile->slug, ‘view’ );
}
add_action( ‘init’, ‘ray_remove_view_nav’ );But, it’s not working. My guess is ‘view’ is the wrong slug name, but I don’t know what it is.
October 18, 2013 at 03:24 #4581gideon1210ParticipantI found the slug its public, is there anyway of changing the default link on the Profile tab so it links to edit instead of public
October 18, 2013 at 13:17 #4596SQadminKeymasterHi,
This code added to wp-content/bp-custom.php ges the job doneCOPY CODEfunction my_change_profile_default_subnav() { global $bp; bp_core_new_nav_default(array( 'parent_slug' => $bp->profile->slug, 'screen_function' => 'bp_profile_screen_edit', 'subnav_slug' => 'edit')); } add_action( 'bp_setup_nav', 'my_change_profile_default_subnav' );
but you won’t be able to see other users’s profile tab
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 18, 2013 at 17:26 #4614adamParticipantHi @sqadmin – this code worked, thanks! but, how do I get rid of the View tab? it’s still shows to the left of Edit, even though when you click on it it reverts back to edit.
October 18, 2013 at 17:28 #4615gideon1210Participantfunction ray_remove_public_nav() {
global $bp;bp_core_remove_subnav_item( $bp->profile->slug, ‘public’ );
}
add_action( ‘init’, ‘ray_remove_public_nav’ );October 18, 2013 at 17:32 #4617adamParticipantI put that in my functions.php, but my View tab still shows 🙁
October 18, 2013 at 17:33 #4618SQadminKeymasterInstead of your add_action(); add this add_action( ‘bp_setup_nav’, ‘ray_remove_public_nav’ );
And add this code to plugins/bp-custom.php
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 18, 2013 at 17:48 #4619adamParticipantI’ve added this to bp-custom.php:
function ray_remove_public_nav() {
global $bp;
bp_core_remove_subnav_item( $bp->profile->slug, ‘public’ );
}
add_action( ‘bp_setup_nav’, ‘ray_remove_public_nav’ );but still can’t get it to remove the View tab. i refreshed my cache too in case that was the issue. any other ideas? thanks for your help.
October 18, 2013 at 18:45 #4621adamParticipantGot it! I put this in bp-custom.php:
function remove_profile_view() {
bp_core_remove_subnav_item( ‘profile’, ‘public’ );
}
add_action( ‘bp_setup_nav’, ‘remove_profile_view’, 100 );November 9, 2015 at 23:48 #86495MirekParticipanthi,
Is it still possible to set sub tabs (‘edit’) as defaults when visiting profile ?cuz I can’t get it to work …
COPY CODEfunction my_change_profile_default_subnav() { global $bp; bp_core_new_nav_default(array( 'parent_slug' => $bp->profile->slug, 'screen_function' => 'bp_profile_screen_edit', 'subnav_slug' => 'edit') ); } add_action( 'bp_setup_nav', 'my_change_profile_default_subnav', 5 );
it’s give me 404 error.
Thanks for any advice.
Cheers
Mirek -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.