@izzethan You can disable the admin toolbar for anyone who is not logged in simply by going to Settings > BuddyPress > Options tab, then make sure that “Toolbar – Show the Toolbar for logged out users” is not checked.
This question is basically impossible to answer without lots of other information. If your theme has a separate notification count code from the default one that shows up in the toolbar, you can rip that code out of the site and put it elsewhere — if not you’re going to have to learn to code it yourself or hire someone to do it for you.
You could start with searching “how to add buddypress notifications to template”
@brianstoiber do you happen to have woocommerce installed? I just noticed this myself. I turned off woocommerce and it revealed the toolbar.
I am on the BuddyPress Settings page and under Options, the first one is
Main Settings
Tool Bar Show the Toolbar for logged out users
https://imgur.com/76EN0i7
“Show the Toolbar for logged out users” doesn’t sound like a wp or bp setting? Is that a setting of your theme or a plugin? I could be wrong of course but sounds like something to do with theme/plugin.
I have a site that checked the box next to Show the Toolbar for logged out users in the settings. However it doesn’t appear to do anything? When I visit the site, it does not show the tool bar for anyone other than logged in admins.
My apologies to all. I found out how to fix the problem of not being able to add additional tabs to the profile section for users on a main social site empowered by BuddyPress. You have to go to WordPress admin > Users > Profile fields and you can add any fields to the profile section of your social site website that is empowered by BuddyPress. This allows users to add their name, bio, location, work, education and anything else you want them to be able to add in their profile on your social site empowered by BuddyPress instead of in the backend of the wordpress page. Also, you can install a plugin that prevents your users from clicking on the dashboard link in top left toolbar and going to backend profile of WordPress, which is called Remove Dashboard access Version 1.1.3 | By Drew Jaynes and can be found at https://wordpress.org/plugins/remove-dashboard-access-for-non-admins/ That said, problem solved and may my solution fix this same users not being able to add more fields in their profile section on a main social website powered by BuddyPress that other admins encounter permanently.
Nevermind all. I found out how to fix it. You have to go to WordPress admin > Users > Profile fields and you can add any fields to the profile section of the profile on your website. This allows users to add their name, bio, location, work, education and anything else you want them to be able to add in their profile on your site instead of in the backend of the wordpress page. Also, you can install a plugin that prevents your users from clicking on the dashboard link in top left toolbar and going to backend profile, which is called Remove Dashboard access Version 1.1.3 | By Drew Jaynes and can be found at https://wordpress.org/plugins/remove-dashboard-access-for-non-admins/ That said, problem solved and may my solution fix this same users not being able to add more fields in their profile section on a main website powered by BuddyPress that other admins encounter permanently.
Hi,
Is there a way to hide the rich text editor toolbar in a multi-line text area field based on the users role.
I don’t want to have to create separate fields for each user role.
Thank you
One way is to use the wordpress toolbar dropdown as I described earlier, there’s a profile option and in there you can select change profile image
Hi 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.
So long as you have groups enabled then you should see create group in the Groups page, and also as an option in the WordPress toolbar under groups.
The basic option is to set up a redirect for anyone but admin, that would involve adding some code to your functions.php. There’s probably plugins that d it, but it’s quite simple with code if you are happy with that.
That would not stop links from appearing in the WordPress admin-bar / toolbar. Would you still want to give them access to the BuddyPress menu options via the toolbar?
I’ve recently launched a BP specific Front End editor and I’ve included all the various hide admin code in that. You can choose to hide the admin-bar altogether or prune out the menu items you don’t want to display, such as the +New menu item.
Here’s how to remove forums from all users profile tabs and toolbar menu, this code would need to go in your child-themes functions.php:
function venutius_remove_forums_on_usermenu() {
global $wp_admin_bar;
if ( bp_use_wp_admin_bar() ) {
$wp_admin_bar->remove_node( 'my-account-forums' );
}
}
add_action( 'wp_before_admin_bar_render', 'venutius_remove_forums_on_usermenu' );
function venutius_remove_profile_forums_tab() {
bp_core_remove_nav_item( 'forums' );
}
add_action( 'bp_actions', 'venutius_remove_profile_forums_tab' );
Untested, but try:
function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
// New custom notifications
if ( 'custom_action' === $action ) {
$custom_title = "You have new custom notification";
$custom_link = get_permalink( $item_id );
$custom_text = "You have a new custom notification";
// WordPress Toolbar
if ( 'string' === $format ) {
$return = apply_filters( 'custom_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link );
// Deprecated BuddyBar
} else {
$return = apply_filters( 'custom_filter', array(
'text' => $custom_text,
'link' => $custom_link
), $custom_link, (int) $total_items, $item_id, $secondary_item_id );
}
return $return;
}
}
add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 20, 5 );
I need some custom notifications in my website. I have my code bellow, all work correctly, notification is added into database and displayed at the recipient, but without notification text
How i can fix this?
Thank you
function custom_filter_notifications_get_registered_components( $component_names = array() ) {
// Force $component_names to be an array
if ( ! is_array( $component_names ) ) {
$component_names = array();
}
// Add 'custom' component to registered components array
array_push( $component_names, 'custom' );
// Return component's with 'custom' appended
return $component_names;
}
add_filter( 'bp_notifications_get_registered_components', 'custom_filter_notifications_get_registered_components' );
function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
// New custom notifications
if ( 'custom_action' === $action ) {
$custom_title = "You have new notification";
$custom_link = "domain.com";
$custom_text = "You have new notification";
// WordPress Toolbar
if ( 'string' === $format ) {
$return = apply_filters( 'custom_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link );
// Deprecated BuddyBar
} else {
$return = apply_filters( 'custom_filter', array(
'text' => $custom_text,
'link' => $custom_link
), $custom_link, (int) $total_items, $custom_text, $custom_title );
}
return $return;
}
}
add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 10, 5 );
function bp_custom_add_notification( $receiver_user_id, $initiator ) {
//$post = get_post( $comment_object->comment_post_ID );
//$author_id = $post->post_author;
bp_notifications_add_notification( array(
'user_id' => $receiver_user_id,
'item_id' => $initiator,
'secondary_item_id' => $initiator,
'component_name' => 'custom',
'component_action' => 'custom_action',
'date_notified' => bp_core_current_time(),
'is_new' => 1,
) );
}
add_action( 'wp_insert_custom_notification', 'bp_custom_add_notification', 99, 2 );
There’s a setting for that in Settings>BuddyPress>Options – Show Toolbar to logged out users.
Hi, I am a using a combination of WP Members and Buddypress.
I use Buddypress for the activity registration and the extended profile fields.
As an admin I can see and edit the extended profile field of my members, but they do not have the toolbar. How can I add a ‘my profile page’ where they can see and edit their extended fields and activities?
They can now only see it when they click on their own picture at ‘who’s online’.
Thanks for the help!
“Show Toolbar when viewing site” is a WP setting.
Somebody probably has such a function.
But you should ask a larger audience – try wordpress.org/support/
I figured out the cause for this issue. When going to the user profile for each member, the check box “Show Toolbar when viewing site” is unchecked for all members. If there were only a few registered members I would just go back to each one and change them, however there are hundreds and would take quite a long time.
Is there a function I can put in functions.php to override it and enable toolbar for everyone?
It would be most helpful. Thank you.
Nah nah
I just want to separate the notifications one by one.
For example:
Firstly, I receive a notification : You have 1 new reply on topic “A” from “username”.
Next, a other user comment on my another topic, and I received: You have 2 new replies.
That’s it.
From the second notification, I cant get anything clearly from the notifications, y’know. The notifications which I mention are the notification bubble from admin toolbar and from The notifications Bell module, they have same result.
Finally, I just want the notifications just show one by one, not grouped.
hey guys,
when the user have read/clicked on a notification then the notifitcation should automatically delete. i want to do that with a ajax call.
so my idea is to add a filter on the function bp_notifications_get_notifications_for_user() to manipulate the output.
but i need for the ajax call a notification_id. so that he knows which notofiation he has to delete.
add_filter( 'bp_notifications_get_notifications_for_user', 'bp_follow_notify_format_notifications', 9, 5 );
function bp_follow_notify_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
if ( 'follow_new_post' === $action ) {
if ( (int) $total_items > 1 ) {
$title = sprintf( __( '%d new posts have been published', 'bp-follow-notify' ), (int) $total_items );
$link = bp_get_notifications_permalink();
} else {
$title = sprintf( __( '%s is kiteboarding.', 'bp-follow-notify' ), bp_core_get_user_displayname( $secondary_item_id ) );
$link = get_permalink( $item_id );
}
// WordPress Toolbar
if ( 'string' === $format ) {
$return = apply_filters('bp_follow_notify_notification', '<div onClick="clickedOnNotification('.$notificationID.')" title="' . esc_attr( $title ) . '">' . esc_html( $title ) . '"</div>', $title, site_url().$link );
// Deprecated BuddyBar
} else {
$return = apply_filters( 'bp_follow_notify_notification', array(
'text' => $title,
'link' => $link
), $link, (int) $total_items, $title, $title );
}
return $return;
}
return $action;
}
here is the important line.
$return = apply_filters('bp_follow_notify_notification', '<div
onClick=”clickedOnNotification(‘.$notificationID.’)”title="' . esc_attr( $title ) . '">' . esc_html( $title ) . '"</div>', $title, site_url().$link );
cheers Pau
I don’t think there is a problem with themes or plugin. The toolbar is correctly displayed to registered users.
Hi,
i enabled the option that show the toolbar to the visitor of my website but it does not work. How i can resolve this problem?
BuddyPress Plugin Version: 3.1.0
WordPress Version 4.9.6-it_IT
Hello,
I would like to make visible the toolbar with access to the user profile to registered users. I have disabled the visibility of the toolbar to unregistered users, but apparently not even those registered see it. How can I solve?
Installed Plugins: Akismet Anti-Spam, Asgaros Forum, BuddyPress, iubenda Cookie Solution for GDPR, JS Support Ticket, Maintetance by fruitfulcode, Really Simple SSL