Search Results for 'change buddypress menu'
-
AuthorSearch Results
-
October 21, 2019 at 7:28 pm #308592
Kir 2012
ParticipantHi how would I change the name of the buddypress activity tab to include the name of the displayed user? Just the activity tab, I have this code below:
////////////////////////////////////CHANGE MENU NAMES / POSITIONS ////////////////////////////// function mb_profile_menu_tabs(){ global $bp; //$bp->bp_nav['activity']['position'] = 14; $bp->bp_nav['activity']['name'] = 'Feed'; } add_action('bp_setup_nav', 'mb_profile_menu_tabs', 201); //////////////////////////////////// CODE END ///////////////////////////////////////////////////The above code in functions changes the tab name to Feed but I’m trying to work out how to make the tab name: ‘displayed username’s Feed’
Has anyone had to do this before / got any pointers? I’d be so grateful, I’ve researched and tried various things but can’t seem to get it working
Thank you 🙂
July 24, 2019 at 11:21 am #307115nicolafern
ParticipantHi
My site has recently been switched from a managed wordpress platform to a business shared platform by my host because of an uptime issue.
Now, when logging in there are some issues with other user’s details being confused with those of the logged in user, for example the other user’s details appearing in the top right hand buddypress menu (including linking to the profile of that user), places where I have shortcodes to access usernames etc show the wrong ones. This is obviously a GDPR issue.
I haven’t made any change to the platform apart from moving the hosting. My host says there’s no sign of database corruption, and I have done things like purging caches and also updated to the new release of BP.
The host said: The only thing I’m wondering is whether BuddyPress requires a PHP module that’s not enabled on the Business plan to run your site correctly (I’ve very little direct experience with BP unfortunately!). And suggested I post a query here.
Unfortunately this is very much the wrong time for an issue like this to rear up as I’m in the middle of launching my community and have a number of people who have registered and are awaiting activation, and a big event planned for tomorrow which will involve the community site.
Has anyone got any idea what the problem could be – or about what php module could be required as per my host’s question?
Many thanks!
NicolaMay 19, 2019 at 10:04 am #305981Thilina Wickramasinghe
ParticipantHi,
I know there’s is a article about multi-site menu settings:
But in my case, I need to add menus separately for each sub sites (manually translation purpose). In sub sites ‘Menu’ section doesn’t contains “BuddyPress” menu option. So, I don’t see any option to redirect users from sub-sites to their user profiles or profile settings pages.
WordPress version: 5.2
BuddyPress version: 4.3.0I tried “Multisite Master Shared Menu” (https://tt.wordpress.org/plugins/multisite-shared-menu/) plugin to share WordPress root site menu with other sub sites and it’s working. But still I’m unable to change menu text (if I change root site menu, changes applied into all sites menus).
Is there any additional options available to link menus into sub sites?
Thank you!May 1, 2019 at 6:48 pm #305549In reply to: bp_nav was called incorrectly
polywebjeff
ParticipantSwitching to the default aarvark theme did indead remove the error messages. I’ve switched back to the child theme, and removed mycode from bp-custom. No results. My BP templates do not contain bp_nav, but I didn’t took the time to change the file versions in the top comments. I have those custom files:
- aarvark-child/buddypress/members/single/myorganization/edit.php
/** * BuddyPress - Members Single Profile Edit * * @package BuddyPress * @subpackage bp-legacy * @version 3.0.0 */- aarvark-child/buddypress/members/single/myorganization/profile-loop.php
/** * BuddyPress - Members Profile Loop * * @package BuddyPress * @subpackage bp-legacy * @version 3.0.0 */- aarvark-child/buddypress/members/single/myorganization/profile-wp.php
/** * BuddyPress - Members Single Profile WP * * @package BuddyPress * @subpackage bp-legacy * @version 3.0.0 */- aarvark-child/buddypress/members/single/profile/edit.php
/** * BuddyPress - Members Single Profile Edit * * @package BuddyPress * @subpackage bp-legacy * @version 3.0.0 */- aarvark-child/buddypress/members/single/home.php
/** * BuddyPress - Members Home * * @package BuddyPress * @subpackage bp-legacy */- aarvark-child/buddypress/members/single/member-header.php
/** * BuddyPress - Users Header * * @package BuddyPress * @subpackage bp-legacy */- aarvark-child/buddypress/members/register.php
no version in commentsIn my functions.php file:
// New buddypress nav items function add_bp_menu_items() { global $bp; //Remove unwanted nav items bp_core_remove_nav_item( 'activity' ); bp_core_remove_nav_item( 'forums' ); bp_core_remove_nav_item( 'user-media' ); // bp_core_remove_subnav_item( 'profile', 'public' ); unset($bp->bp_options_nav['profile']['public']); unset($bp->bp_options_nav['profile']['change-avatar']); unset($bp->bp_options_nav['profile']['change-cover-image']); unset($bp->bp_options_nav['settings']['profile']); unset($bp->bp_options_nav['settings']['data']); $bp->bp_options_nav['profile']['name'] = 'My Profile'; } add_action( 'bp_setup_nav', 'add_bp_menu_items', 15 ); // Change Profile menu/tab order function rt_change_profile_tab_order() { global $bp; $bp->members->nav->edit_nav( array( 'name' => 'My Profile', ), 'profile' ); $bp->members->nav->edit_nav( array( 'position' => 1, ), 'profile' ); $bp->members->nav->edit_nav( array( 'position' => 65, ), 'notifications' ); } add_action( 'bp_init', 'rt_change_profile_tab_order', 999 );April 12, 2019 at 10:04 pm #304729Venutius
ModeratorThis one is not that straight-forward there is a filter you can use as follows:
function bpex_role_disable_avatar_uploads( $default ) { $user = wp_get_current_user(); $user_roles_array = $user->roles ? $user->roles : array(); foreach ( $user_roles_array as $key => $role ) { if ( $role == 'subscriber' ) { $default = true; } } return $default; } add_filter( 'bp_disable_avatar_uploads', 'bpex_role_disable_avatar_uploads' );However this causes BuddyPress to simply show the user that they can upload their profile image via gravatar, and I’m afraid you can’t switch this off.
So the alternative is to remove the Change Photo tab and admin-bar menu item:
add_action( 'bp_setup_nav', 'bpex_remove_change_profile_photo_tab', 50 ); add_action( 'bp_setup_admin_bar', 'bpex_admin_bar_remove_change_profile_photo', 50 ); function bpex_remove_change_profile_photo_tab() { if ( ! bp_is_user_profile() && ! bp_is_user_activity() && ! bp_is_user() && bp_displayed_user_id() != wp_get_current_user() ) { return; } $user = wp_get_current_user(); $user_roles_array = $user->roles ? $user->roles : array(); foreach ( $user_roles_array as $key => $role ) { if ( $role == 'subscriber' ) { bp_core_remove_subnav_item( 'profile', 'change-avatar' ); } } } function bpex_admin_bar_remove_change_profile_photo() { global $wp_admin_bar, $bp; if ( ! bp_use_wp_admin_bar() || defined( 'DOING_AJAX' ) ) { return false; } $user_id = get_current_user_id(); if ( ! $user_id || $user_id == 0 || ! is_numeric( $user_id ) ) { return; } $user = wp_get_current_user(); $user_roles_array = $user->roles ? $user->roles : array(); foreach ( $user_roles_array as $key => $role ) { if ( $role == 'subscriber' ) { $wp_admin_bar->remove_menu( 'my-account-xprofile-change-avatar', 'my-account-xprrofile' ); } } }You’d need to put this in your child themes functions.php or a bp-custom.php file in the plugins directory.
April 12, 2019 at 3:12 pm #304711In reply to: BuddyPress Custimizations
Venutius
ModeratorHi there, some answers:
1. You can change the layout of profiles by overloading the profile files and css, see: https://codex.buddypress.org/themes/theme-compatibility-1-7/theme-compatibility-2/ it’s possibly a bit advanced for you right now but all the files in the plugins/buddypress/bp-templates/your-bp-theme/buddypress can be copied, modified and loaded from your child theme directory. Similarly you can overload the css to make styling and layout changes.
1b. The default is for horizontal navigation unless you’ve changed it in Customizer>>BuddyPress.
2. The BuddyPress extended profile is editable from the front end, and avatar too. It’s only the wordpress profile that’s enditable in admin and most BP sites don’t use that as t’s really set up for authors.
3. I recently posted the code to combine all the profile activity feeds into 1, https://buddypress.org/support/topic/how-to-combine-activity-tabs-to-one/
4. https://wordpress.org/plugins/cb-change-mail-sender/
5+6 are bbPress questions, for the best answer you should post on their forum https://bbpress.org/forums/
7. Assuming you have set up the groups directory page and enabled group creation by users in Settings>>BuddyPress>>Options, users will have the option to create groups on the Groups directory page and also from the Groups menu of the WordPress toolbar ( top right hand side of the screen, hover over your avatar image, drop down will appear one option will be groups.
April 4, 2019 at 12:16 pm #304339In reply to: how to combine activity tabs to one
Venutius
ModeratorHi there,
My suggestion is that you add a new menu item “All” and create a new set of queries for the page then make that page the default landing page for the profile activity page. Here’s my code to do this:
function bpex_set_member_default_nav() { if ( ! bp_is_user_profile() && ! bp_is_user_activity() && ! bp_is_user() ) { return; } bp_core_new_nav_default( array( 'parent_slug' => buddypress()->activity->id, // other "activity" sub_nav slugs : personal favorites friends groups mentons 'subnav_slug' => 'all-activity', 'screen_function' => 'bp_activity_screen_all_activity' ) ); } add_action( 'bp_setup_nav', 'bpex_set_member_default_nav', 20 ); add_action( 'bp_setup_nav', 'bpex_just_me_tab', 50 ); add_action( 'bp_setup_admin_bar', 'bpex_admin_bar_add', 50 ); function bpex_just_me_tab() { if ( ! bp_is_user_profile() && ! bp_is_user_activity() && ! bp_is_user() ) { return; } global $bp; $user_id = bp_displayed_user_id(); bp_core_new_subnav_item( array( 'name' => _x( 'All', 'Profile activity screen sub nav', 'buddypress' ), 'slug' => 'all-activity', 'parent_url' => bp_core_get_user_domain( $user_id ) . 'activity/', 'parent_slug' => 'activity', 'screen_function' => 'bp_activity_screen_all_activity', 'position' => 10 ) ); } function bpex_admin_bar_add() { global $wp_admin_bar, $bp; if ( ! bp_use_wp_admin_bar() || defined( 'DOING_AJAX' ) ) { return false; } $user_id = get_current_user_id(); if ( ! $user_id || $user_id == 0 || ! is_numeric( $user_id ) ) { return; } // Personal. //$wp_admin_bar->remove_menu( 'my-account-activity-personal', 'my-account-activity' ); $wp_admin_bar->add_menu( array( 'parent' => 'my-account-activity', 'id' => 'my-account-activity-all-activity', 'title' => 'All', 'href' => bp_core_get_user_domain( $user_id ) . 'activity/all-activity/', 'position' => 10 ) ); } function bp_activity_screen_all_activity() { do_action( 'bp_activity_screen_all_activity' ); bp_core_load_template( apply_filters( 'bp_activity_template_all_activity', 'members/single/home' ) ); } function bp_activity_filter_all_activity_scope( $retval = array(), $filter = array() ) { // Determine the user_id. if ( ! empty( $filter['user_id'] ) ) { $user_id = $filter['user_id']; } else { $user_id = bp_displayed_user_id() ? bp_displayed_user_id() : bp_loggedin_user_id(); } // Should we show all items regardless of sitewide visibility? $show_hidden = array(); if ( ! empty( $user_id ) && $user_id !== bp_loggedin_user_id() ) { $show_hidden = array( 'column' => 'hide_sitewide', 'value' => 0 ); } // Determine groups of user. $groups = groups_get_user_groups( $user_id ); if ( empty( $groups['groups'] ) ) { $groups = array( 'groups' => 0 ); } // Determine the favorites. $favs = bp_activity_get_user_favorites( $user_id ); if ( empty( $favs ) ) { $favs = array( 0 ); } // Determine friends of user. $friends = friends_get_friend_user_ids( $user_id ); if ( empty( $friends ) ) { $friends = array( 0 ); } $retval = array( 'relation' => 'OR', array( 'relation' => 'AND', array( 'column' => 'user_id', 'compare' => 'IN', 'value' => (array) $friends ) ), array( 'relation' => 'AND', array( 'column' => 'component', 'value' => buddypress()->groups->id ), array( 'column' => 'item_id', 'compare' => 'IN', 'value' => (array) $groups['groups'] ) ), array( 'relation' => 'AND', array( 'column' => 'user_id', 'value' => $user_id ) ), array( 'relation' => 'AND', array( 'column' => 'id', 'compare' => 'IN', 'value' => (array) $favs ) ), array( 'relation' => 'AND', array( 'column' => 'content', 'compare' => 'LIKE', // Start search at @ symbol and stop search at closing tag delimiter. 'value' => '@' . bp_activity_get_user_mentionname( $user_id ) . '<' ) ), // We should only be able to view sitewide activity content for friends. array( 'column' => 'hide_sitewide', 'value' => 0 ), // Overrides. 'override' => array( 'filter' => array( 'user_id' => 0 ), 'show_hidden' => true ), ); return $retval; } add_filter( 'bp_activity_set_all-activity_scope_args', 'bp_activity_filter_all_activity_scope', 10, 2 );Once you have done that you would also want to overload the buddypress/bp-templates/your-template/members/single/activity.php to make sure this new page contains the post update form:
Change:
if ( is_user_logged_in() && bp_is_my_profile() && ( !bp_current_action() || bp_is_current_action( 'just-me' ) ) ) bp_get_template_part( 'activity/post-form' );To:
if ( is_user_logged_in() && bp_is_my_profile() && ( !bp_current_action() || bp_is_current_action( 'all-activity' ) ) ) bp_get_template_part( 'activity/post-form' );Note: with this method there is a danger of duplicating activity since a friend posting to a group would show up in the groups search as well as the friends search etc. so you may want to adjust the $retval criteria.
Also you might want to add a post form for visiting users so they can leave a comment for the user, you could ad this:
function bpex_load_mention_me() { if ( get_current_user_id() != bp_displayed_user_id() ) { $_GET['r'] = bp_activity_get_user_mentionname( bp_displayed_user_id() ); bp_get_template_part( 'activity/post-form' ); } } add_action( 'bp_before_member_body', 'bpex_load_mention_me' );March 27, 2019 at 4:42 pm #304079In reply to: Disable scroll top
Venutius
ModeratorHi there, WordPress and BuddyPress are predominately PHP applications. PHP requires a page load in order to view new content and this is what you are seeing – you click a menu item a new page loads and it starts from the top of the page again. There are tricks to bring the page focus back to where you were and BP uses these where appropriate, another trick is to use Javescript to fetch now content and again BP uses this, in the activity page for example. But when you are clicking a main link, an entire now page is going to be loaded to there’s not a reference of where you were in order to set the new page focus. So in short, it’s the way WordPress and BuddyPress have been written, yu’d need to do a significant rewrite to change it.
March 7, 2019 at 11:31 pm #303379ecogpast
ParticipantThank you for further discussion. BuddyPress has a built-in custom link that it offers to populate into menus so that people who are logged out can log in. That custom link goes to the default wp-login.php. That is part of BuddyPress for sure. It has the nice capability of only being present if someone is logged out, so I don’t want to forgo that nice BuddyPress feature. If I uninstall BuddyPress it goes away. However, for security reasons I have changed my login URL, so I just want to set the BuddyPress custom link to match. This is why I am seeking help, as it is a BuddyPress feature and problem I need help with. Thanks!
March 7, 2019 at 10:39 pm #303375ecogpast
ParticipantThank you for responding. BuddyPress has two sets of menu items it can add: “Logged-in” links and “Logged-out” links. The menu option to log in falls into the latter set, because people have to be logged out to then log in 😉 Anyway, I cannot see a way to edit that custom link from within the Appearance -> Menus part of the admin panel.I can change the label, but not the URL. Do you know a way to change that URL?
I guess I could create my own custom link in the menu admin panel, but then it will be on for all users whether they are logged in or not. That’s not desirable. The goal is to have BuddyPress’ capability.
What do you think? Thanks!
November 5, 2018 at 9:33 am #280265evillizard
Participant@dope-boy you are really rude for the “stupid” statment to @prashantvatsh
…
what @prashantvatsh gave you is the best solution to what you are actually looking for..
the only way to change buddypress labels like on the menu (“friend, profile, notification ” ) .. the best way is my changing the language to your choice
..
@prashantvatsh was just trying to helpOctober 13, 2018 at 2:18 pm #278562In reply to: Personalised Welcome and Activation Messages
Prashant Singh
ParticipantFor the activation and welcome messages you can find them in Email menu in dashboard. Find the one that you want to edit and add your text there and then test.
If wants to do it with code then please check this https://websistent.com/custom-buddypress-activation-email/
Same for the translation. You can change the content there in the Email menu.
Please see: https://prnt.sc/l5n76g
Thanks
May 31, 2018 at 9:17 am #273790In reply to: Activation Emails are not being sent
Paul Wong-Gibbs
KeymasterWe have this fixed for our next release, v3.1. This will be released next week (Wednesday) at the latest. The bug was addressed at https://buddypress.trac.wordpress.org/ticket/7869
@alpokoskiniva “Repair email” deletes the emails from the “Emails” menu, then re-adds them. You don’t need to do this unless you’ve added a translation to your site after installing BuddyPress, and want the translated emails, or if you’ve made a code change to the email language in the BuddyPress files, which is what @filipponeri20 has done. We strongly recommend that no-one ever changes a core file of BuddyPress, because it will be overwritten when you update.April 27, 2018 at 7:21 pm #272451In reply to: Before I use BP, why not SocialEngine or Peepso?
Venutius
ModeratorHi Glenn,
I’ve never tried Peepso or Social Engine, so I@m not speaking from a point of balance. I have tried other dedicated hosted platforms such as Ning though so I do have some wider experience.
I think your issues can be boiled down into two areas: Maintenance, and features.
Any WordPress site, any site for that matter is going to require maintenance the main question is who does that maintenance, how well is it done and how quickly new issues can be resolved.
With a WordPress/BuddyPress installation I’d say that the level of maintenance that you yourself have to do (or pay for) is going to be higher than with peepso. Much depends on what features your add to the basic installation, in my experience in general WP and BP updates are solid and cause few issues, it’s usually the other plugins that can cause issues (prime eample recently was a SiteOrigin Page Builder update that wrecked my front page and they did not fix it for several months).
My expectation with Peepso is that what you sacrifice in the way of variety of options available to you I’d hope that in return the options you do get will be reasonably well integrated with each other and less likely to cause conflicts resulting in feature or site loss that you would need to take a hand in resolving. The downside is if you find there are specific feature you need, or issues that are not getting resolved, you have few alternatives to go to, you may find yourself stuck.
I once had a paid hosted site costing $50 per month which pretty much ground to halt and the provider refused to see the problem. It made me feel pretty helpless and it was the reason I moved to BuddyPress – I figured the money I saved on hosting I could use to fund feature additions to the basic BP setup.
Anyway getting back to the point, so I reckon peepso will be less maintenance but with less features, and this brings me on to the second point – features.
I think it would probably be a good idea to map out exactly which features you want in quite some detail and see how that drives your thoughts. For example you say you want video, would this be you hosting the video files or libraries of YouTube style embeds? Would you need group galleries, user galleries, sitewide gallery etc?
Here’s what I tend to use:
Chat – IfyChat – free version limited to 10 concurrent users but an excellent chat engine
Video/photos/audio – Either MediaPress or rtMedia, rtMedia is more stylish but add-ons are quite expensive.
Groups/xprofiles, activity, friends – BuddyPress.
News areas – probably more general workpress based solutions for this, are you thinking RSS feeds from other sites or internal news (could be done with a simple News category?).
Polls – never really looked at polls, I note there is this – https://themekraft.com/new-plugin-buddypress-polls/ for starters, looks interesting but I’ve not tried it.Regarding supporting mobile, BP is coming out with a new theme – BP Nouveau, this has options for vertical menus which I think will be a lot more mobile friendly.
The bulk of being mobile friendly comes down to the theme you are using and whilst most are responsive these days I personally find that having a mobile responsive theme is not good enough for phones, what I do is run a second mobile specific theme and use a theme switcher to detect and switch themes.
Another point to bear in mind with BP is that there are a great many plugins that help you choose how your site is going to work, there’s a range of plugins that change the may notifications and email subscriptions work. This is a benefit of BP, but it does also increase the plugin count.
April 4, 2018 at 10:10 pm #271791Brendan
ParticipantSure thing. I want to be able to have users post in those three post-types because of how they function. A blog post (custom post type) is suited for a story, a longer-form thing. A forum post is great for Q/A, and a “Tutor Tip” for example sits somewhere between a blog post and a simple status update, so I’m thinking about a second custom post type.
The main UX design choice for this is to have all of those options in one place, rather than sub-pages or sub-menus, etc.
It’s also easy for our moderators to be able to “feature” a blog post.
With buddypress, it’s my understanding that blog posts (with plugins like buddyblock, etc) show up in the activity feed, forum posts can be told to show up in the activity feed.
My thought is either to have three fields(Story, Question, Tip) , which have buttons that toggle their respective visibility.
Or
Have the one field, and the buttons change the destination on submit to one of the three.
Does that help?
March 17, 2018 at 11:56 am #271435In reply to: BP profile navigation menu queue
Venutius
ModeratorJust search the forum for past suggestions, this thread for example explains how to change the menu ordering:
BP 2.6.1.1 – Object of class BP_Core_BP_Nav_BackCompat could not be converted to string error
February 9, 2018 at 10:34 am #270703In reply to: Why is Members page not part of the BuddyPress menu?
Henry Wright
ModeratorI wonder why Members page is not part of the BuddyPress menu?
Good question! This is something you can change at the theme level. Nearly all areas of BuddyPress can be customised. If you need help feel free to post questions and open new topics.
January 30, 2018 at 5:17 pm #270450In reply to: Fixing deprecated bp_nav code?
David Cavins
KeymasterTo change items, see the link I referenced: https://codex.buddypress.org/developer/navigation-api/#change-item-names-of-users-and-groups-nav-menus
January 14, 2018 at 8:08 am #270087In reply to: Remove Profile Nav Items
Varun Dubey
ParticipantHi @shayne-thiessen
You can use code suggest in following thread.January 10, 2018 at 9:36 pm #270047Topic: Change menu items below user header
in forum How-to & Troubleshootingbrunothomas
ParticipantHello guys,
I’m new to wordpress themes customization so I’d like some help with a few questions.
I’ve been running a buddypress community for some months now but I couldn’t find out these things:
1) How do I remove items from the menu bar that’s below the user profile header? I tried via the usual Menu customization option in WP dashboard but couldn’t find it.
2) How do I add a link to a custom page to that same menu and make it open within the same template, that is, showing the header and menu bar on the top of the content I created?
Reference: https://i.imgur.com/IR5Ptbq.png
Thanks!
Bruno
January 8, 2018 at 8:01 pm #270022nicecap
ParticipantWow – thank you leo – you came up with the right track. When I add Activity from the BuddyPress items to my menu it will be the “…/members/username/activity” version and when I add Activity from the pages items it will be “…/activity”, so I changed that.
But it’s true then the header is missing. I will fix this.
Thank you very much for your effort helping me!
January 6, 2018 at 5:24 pm #269956In reply to: i want to edit buttons.
leog371
Participant/* Example to Change item names of user’s and group’s nav menus ... Profile Menu https://codex.buddypress.org/developer/navigation-api/#examples */ function bpcodex_rename_profile_tabs() { buddypress()->members->nav->edit_nav( array( 'name' => __( 'My Forums', 'textdomain' ) ), 'forums' ); buddypress()->members->nav->edit_nav( array( 'name' => __( 'MY Groups', 'textdomain' ) ), 'groups' ); } add_action( 'bp_actions', 'bpcodex_rename_profile_tabs' );/* Example to Rename Group Menus https://codex.buddypress.org/developer/navigation-api/#examples*/ function bpcodex_rename_group_tabs() { if ( ! bp_is_group() ) { return; } buddypress()->groups->nav->edit_nav( array( 'name' => __( 'Group Discussion', 'buddypress' ) ), 'forum', bp_current_item() ); buddypress()->groups->nav->edit_nav( array( 'name' => __( 'Group Members', 'buddypress' ) ), 'members', bp_current_item() ); buddypress()->groups->nav->edit_nav( array( 'name' => __( 'Group Activity', 'buddypress' ) ), 'home', bp_current_item() ); } add_action( 'bp_actions', 'bpcodex_rename_group_tabs' );/* Example to Remove subnav tabs from Group Settings https://codex.buddypress.org/developer/navigation-api/#examples*/ function bpcodex_remove_group_manager_subnav_tabs() { // site admin will see all tabs if ( ! bp_is_group() || ! ( bp_is_current_action( 'admin' ) && bp_action_variable( 0 ) ) || is_super_admin() ) { return; } // all subnav items are listed here. // comment those you want to show $hide_tabs = array( // 'group-settings' => 1, // 'delete-group' => 1, // 'group-avatar' => 1, // 'group-invites' => 1, // 'manage-members' => 1, // 'forum' => 1, // 'group-cover-image' => 1 ); $parent_nav_slug = bp_get_current_group_slug() . '_manage'; //Remove the nav items foreach ( array_keys( $hide_tabs ) as $tab ) { bp_core_remove_subnav_item( $parent_nav_slug, $tab, 'groups' ); } } add_action( 'bp_actions', 'bpcodex_remove_group_manager_subnav_tabs' );December 11, 2017 at 1:52 pm #269508In reply to: Buddypress profile on existing navbar
peter-hamilton
ParticipantI think you need a child-theme and change the header.php to include your custom navigation, I have created a similar menu but did require a lot of work in the header.

When new messages the number of messages shows in the message-icon, links to profile page, also woocommerce integrated and a dashboard link for admin only.
The following is in my custom header.php
First code links to profile.
<li><a href="<?php echo bp_loggedin_user_domain(); ?>" class="activitylink" title="My Account"><span class="dashicons dashicons-admin-users"></span></a></li>This code deals with messages.
<li><a href="<?php global $current_user; echo home_url() . '/members/' . $current_user->user_login . '/messages/'; ?>"><span class="dashicons dashicons-admin-comments"></span><span class="commentcount"><?php if (bp_get_total_unread_messages_count( bp_loggedin_user_id() ) > 0 ) { ?> <?php bp_total_unread_messages_count( bp_loggedin_user_id() ) ?><?php } ?></span></a> </li>Since I did not want too much in my nav I only used these buddypress features, more would clog up my website too much.
But where it comes down to is with a child-theme you can make it exactly as you like.
Good luck
P.H.August 25, 2017 at 1:20 pm #267708In reply to: How to hide / remove the General tab under Settings
lenasterg
ParticipantHi. I made a minor change in the code @danbp suggests (basically the $args[‘subnav_slug’] and now I believe it works as expected.
So I guess it’s not a BuddyPress bug.Please, try the following
function bpex_change_profile_settings_default_tab() { if( bp_is_active( 'xprofile' ) ) : $access = bp_core_can_edit_settings(); $slug = bp_get_settings_slug(); $args = array( 'parent_slug' => $slug, 'subnav_slug' => 'notifications', 'screen_function' => 'bp_settings_screen_notification', 'user_has_access' => $access ); bp_core_new_nav_default( $args ); endif; } add_action( 'bp_actions', 'bpex_change_profile_settings_default_tab' ); function bpex_remove_general_item_on_usermenu() { global $wp_admin_bar; if ( bp_use_wp_admin_bar() ) { $wp_admin_bar->remove_node( 'my-account-settings-general' ); } } add_action( 'wp_before_admin_bar_render', 'bpex_remove_general_item_on_usermenu' ); function bpex_remove_profile_settings_general_tab() { if( bp_is_active( 'xprofile' ) ) : bp_core_remove_subnav_item( 'settings', 'general' ); endif; } add_action( 'bp_actions', 'bpex_remove_profile_settings_general_tab' );May 30, 2017 at 10:49 pm #266206shirleyddsn
ParticipantSide Note:
I dont know if I can/should ask this here, or if it should be a different post, but I’m trying to make changes to the buddypress templates in my child theme, and it seems that I’m not allowed (?!) to make changes to the actual templates?For example, I was trying to make changes to cover-image-header.php just to see if I can. I wanted to add “Last Active:” just before the function that lists when the member was last active. Just to see if I could. When I refreshed the page, I thought I saw for a brief second that it did in fact say “Last Active:”, before it disappeared and just showed the original content again. To make sure it was actually my code and not a glitch, I repeated the process but replaced LAST ACTIVE with PIZZA HUT. Just to make sure it was actually me. Refresh -> Pizza Hut flashed. Yup, it was me. But why wont the code stick? Could it be my child theme document tree isn’t right? Or do I need to add some code somewhere so that changes in my child folder override files in the original buddypress folders?
When I copied my files over, I group selected the folders in
plugins/buddypress/bp-templates/bp-legacy/buddypressand copied them all over tothemes/my-theme/buddypress. Am I missing a folder or something?Also: I figured out the concept behind
add_actiontacking on instructions to ado_actionfunction. But where do theDO_ACTIONfunctions live? And am I able to modify those? I would like to add some font-awesome icons to the front of my profile menu links the way we have here, but I can’t find the code that spits out the information. -
AuthorSearch Results
