8 years, 7 months ago
My post is in reference to the main sidebar area on the left where it lists all the areas of a member’s profile (Activity, Profile, Blogs, Wire, etc.)
I’d like to be able to display in the sidebar when a member gets a new message and when there’s a friend request – something like this:
So this way people know when they have something waiting (new message or friend request), instead of having to go in that section to find out.
I can’t figure out where this needs to be edited or how to edit it – I tried searching forums to no avail.
You have to create a new function like bp_adminbar_notifications_menu()
Even if you directly write bp_adminbar_notifications_menu(); in your sidebar you will get the result.
i’m not much of a programmer…has anyone done this before?
I’d appreciate the code for this and guidance on where to implement it.
I am not sure in which sidebar you want to implement this.
If you are talking about blog sidebar in default BP theme.
1. Open sidebar.php from wp-content/themes/bphome/
2. Replace all content with following code
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar('blog-sidebar') ) : ?>
<?php _e( 'Please log in and add widgets to this column.', 'buddypress' ) ?> <a href="<?php echo get_option('siteurl') ?>/wp-admin/widgets.php?s=&show=&sidebar=sidebar-4"><?php _e( 'Add Widgets', 'buddypress' ) ?></a>
<?php endif; ?>
<?php bp_adminbar_notifications_menu(); ?>
3. Check by clicking on any post from main blog.
i was talking about the main nav column on the left titled “ME” which lists:
Friends <—-this I would like to say Friends (2) if there were 2 friend requests
Maybe update for new wire posts too? but at least the friends and messages part
See also: WordPress.org •
Follow BuddyPress on Twitter •
Contact Us •
Terms of Service