Replies
- calu on September 12, 2022 at 12:33 pm in reply to: [Resolved] Hide header on Settings, Visits, Activity and Notifications pages #46471
Hi Brajesh, it’s working perfectly, except for ‘edit’ component,
and for components with hyphens, ‘change-avatar’, ‘change-cover-image’. Is this because they are not part of Main Navs?
In general, how do I add components with hyphens to a slug in an array like this one below, without getting a syntax error?
Regards
Carstenbp_core_new_nav_item( array( 'name' => 'Cover Image', 'slug' => 'change-cover-image', 'screen_function' => false, 'position' => 10, 'parent_url' => bp_loggedin_user_domain() . 'profile/edit/', 'parent_slug' => $bp->profile->slug, 'default_subnav_slug' => 'change-cover-image', 'show_for_displayed_user' => false, ) ); }
- calu on September 12, 2022 at 10:07 am in reply to: [Resolved] Hide header on Settings, Visits, Activity and Notifications pages #46469
Hi Brajesh, thanks for your help, I’m fine with overriding the home.php, I just add the new snippet, to my child theme, not copy all the content of the home.ph, to my knowledge?
You remember right, I used Legacy before, but switched to Nouveau some years ago.
Regards
Carsten - calu on September 11, 2022 at 7:19 pm in reply to: [Resolved] Hide header on Settings, Visits, Activity and Notifications pages #46452
*Message page as well
- calu on September 9, 2022 at 11:12 pm in reply to: [Resolved] remove settings from nav tab only #46428
Hello Ravi, the CSS rule worked very well, thanks a lot for your help.
Regards
Carsten - calu on September 9, 2022 at 1:28 pm in reply to: [Resolved] remove settings from nav tab only #46421
Hello Ravi, thanks for your reply. I would prefer to remove the mark up as well, but if your recommendation is to use CSS I will do that.
I’m using nouveau template pack.
Regards
Carsten - calu on September 9, 2022 at 10:22 am in reply to: [Resolved] remove settings from nav tab only #46418
Hi there, There are several ways out there to remove a nav item, but what is the right way?
false
or
bp_core_remove_nav_item
And which one removes only the nav tab, but not the functionality?
In my case the Settings, which I want to display in the Main menu of my theme only, not in BP navs?
I hope you can bring some clarification to this topic.
Regards
CarstenSolution one:
$bp->bp_nav[‘settings’] = false;
(does not work)Solution two:
function bphelp_remove_settings_from_profile(){ bp_core_remove_nav_item('settings'); } add_action('bp_settings_setup_nav','bphelp_remove_settings_from_profile');
Solution three inclusive Group tabs:
function bpex_hide_profile_menu_tabs() { if( bp_is_active( 'xprofile' ) ) : if ( bp_is_user() && !is_super_admin() && !bp_is_my_profile() ) { // BP's profile main menu items. Comment those to show. // bp_core_remove_nav_item( 'activity' ); bp_core_remove_nav_item( 'profile' ); bp_core_remove_nav_item( 'friends' ); bp_core_remove_nav_item( 'groups' ); // exist only if you use bbPress bp_core_remove_nav_item( 'forums' ); // BP's profile main menu items. Comment those to show. // bp_core_remove_subnav_item( 'activity', 'personnal' ); bp_core_remove_subnav_item( 'activity', 'mentions' ); bp_core_remove_subnav_item( 'activity', 'favorites' ); bp_core_remove_subnav_item( 'activity', 'friends' ); bp_core_remove_subnav_item( 'activity', 'groups' ); } endif; } add_action( 'bp_setup_nav', 'bpex_hide_profile_menu_tabs', 15 ); function bpex_remove_group_tabs() { if ( ! bp_is_group() ) { return; } $slug = bp_get_current_group_slug(); // hide items to all users except site admin if ( !is_super_admin() ) { // bp_core_remove_subnav_item( $slug, 'members' ); bp_core_remove_subnav_item( $slug, 'send-invites' ); // bp_core_remove_subnav_item( $slug, 'admin' ); // bp_core_remove_subnav_item( $slug, 'forum' ); } } add_action( 'bp_actions', 'bpex_remove_group_tabs' );
- calu on August 30, 2022 at 6:56 pm in reply to: [Resolved] Default value in custom fields are not saved after updating #46255
Yes, it’s working now, the default value were already set correctly.
Great job Brajesh, I really appreciate your help.
What about the updated function, will it be overwrited by the next BP update, or will this change be added next update as well?
Regards
Carsten - calu on August 30, 2022 at 6:20 pm in reply to: [Resolved] Default value in custom fields are not saved after updating #46253
Hi Brajesh, I’m glad you were able to locate the issue for me.
I have an object cache plugin running “Object Cache 4 everyone”, I tried to deactivate it, to rule this out, an it returned the same result.
Then I use CloudFlare cache, but this is page cache.Thanks for posting this issue to the BuddyPress community, and yes, you are welcome to update the BuddyPress function. Do you need access to the cPanel File Manager to do this?
Thanks again for your big help!
Regards
Carsten - calu on August 30, 2022 at 5:07 pm in reply to: [Resolved] Default value in custom fields are not saved after updating #46251
Hi Brajesh, thanks for acknowledging the issue, you are welcome to do whatever needed on this site.
Thanks again
Regards
Carsten - calu on August 29, 2022 at 6:28 pm in reply to: [Resolved] Default value in custom fields are not saved after updating #46219
Hi Brajesh, I tested with Twenty-Twenty-Two, with same result.
Can I mail you the credentials to my site?
Regards
Carsten