Remove ’Notification’ link
-
I have Add Buddypress Components disabled but once logged in the Notifications link appears.
Would someone please supply instructions on how to remove it.
Thanks
DV
-
Hey – You’ll have to edit whichever page it is on. With a bit more info, I can help you out.
@ehegwer ? Once you are logged in the Notifications link appear on all pages as the nav bar does.
I want to remove it from the nav bar entirely.No need to edit any page files… and you’d have a hard time finding which ones because it’s not dependent on any page
Simply add the following to the functions.php file in your child-theme (this cancels out the add_action in bp-core-adminbar.php):remove_action( ‘bp_adminbar_menus’, ‘bp_adminbar_notifications_menu’, 8 );
Voilà: no more Notifications menu.
Thanks Ill try that
Hmmmm … it didnt work.
Scuse my ignorance… with a child theme…
I tried both adding your code at the bottom of a copy of functions.php that I put in my child theme directory and got this…Parse error: syntax error, unexpected ‘}’ in /home/oneearth/public_html/byronbayblog.com/wp-content/plugins/buddypress/bp-core/bp-core-adminbar.php on line 184
SO I tried just putting it in an empty functions.php in the child them and got
Fatal error: Cannot redeclare bp_dtheme_add_blog_comments_js()
(previously declared in /home/oneearth/public_html/byronbayblog.com/wp-content/themes/bbbTheme/functions.php:44)
in /home/oneearth/public_html/byronbayblog.com/wp-content/plugins/buddypress/bp-themes/bp-default/functions.php on line 45So I thought to remove the relevant section in bp-core-adminbar.php directly and got
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘bp_adminbar_notifications_menu’ was given in /home/oneearth/public_html/byronbayblog.com/wp-includes/plugin.php on line 395
MembersProjectsPlease help with a little more detail…
DV
It’s best to never edit core files, or you’ll lose all your changes as soon as you update Buddypress.
If you simply copy functions.php from bp-default into your child-theme, you will get all kinds of errors. That’s the only file in your child-theme that must be wholly unique. See the bottom of this page for details: http://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/
Delete the copy of bp-default functions.php you made in your child-theme and create a new file.
Be sure your child-theme’s functions.php file begins with `<?php`
Add the remove_action call,
Then end the file with `?>`Hope this helps!

Hi pcwriter
Okay so I read the BP CHildThemes rave about function.phpI added a functions.php file with just
`<?php
remove_action( ‘bp_adminbar_menus’, ‘bp_adminbar_notifications_menu’, 8 );
?>`Nothing happens, the Notifications menu is still there.
Did I miss something?
The new functions.php is in the top level folder of my ChildTheme.
( I find it annoying that my childtheme is in the main themes folder
whilst the default BP theme is in the BP plugin folder.)Thanks for your help…
Dan VDan, it looks like your code uses curly quotes.
Yours:
`
<?php
remove_action( ‘bp_adminbar_menus’, ‘bp_adminbar_notifications_menu’, 8 );
?>
`If you make your quotes straight, it will work.
`
<?php
remove_action( ‘bp_adminbar_menus’, ‘bp_adminbar_notifications_menu’, 8 );
?>
`David is right. It looks like you used curly quotes or, worse, backticks. Make sure you use single, straight quotes in your code.
Thanks for your patience.
That worked.
I have no idea how the straight quotes became backticks as I swear I never typed it out -
only copy and pasted your code …Ahhh… @pcwriter your first code above has the backticks too -
doesnt look exactly like that but I cjecked by copying and pasting it into Notepad.
Must be something that happens here at BP if you dont do what they say and enclose your code in the submission box below in backticks.“To display code, put it between backticks”.
Anyway – all good now thanks.
DVYou’re right… I hadn’t enclosed the code in backticks, and that almost always causes formatting issues when using copy/paste.
I’m glad evertything worked out
You must be logged in to reply to this topic.