i want to be the only one able to view the link as the admin. When users are viewing their notifications in the right side, there are links to WordPress.org on the left side. I don’t think this part is relevant to my users based on the forums they are discussing.
Any advise Please?
If you mean the WP bar at the top of the screen, then this might help. Add to functions.php
function remove_wp_logo( $wp_admin_bar ) {
if ( !current_user_can( 'administrator' ) && !is_super_admin() ) {
$wp_admin_bar->remove_node( 'wp-logo' );
}
}
add_action( 'admin_bar_menu', 'remove_wp_logo', 999 );
This will remove the WordPress Logo (and therefore the dropdown menu that appears with the link to WordPress.org). If you just want to remove the WordPress.org link in that menu then replace 'wp-logo'
with 'wporg'
in the function above.
Participant
@pattz2016
thanks for your response, I do not want to remove WP adim bar, because that is where the notifications appear. I only want to remove the wp-logo. the drop down wordpress menu at the side of the top bar.
Not the bar itself
Participant
@pattz2016
Where exactly do i insert the code in buddypress/bp-forums/bp-forums-functions.php
Below which comment?
Many thanks.
The code doesn’t remove the bar, it just removes the WordPress logo in the top left.
The code is put in your functions.php file. It is a file you create (if you haven’t already done so) and put in your child theme folder.
hi,
I have created a child theme , named it Frontier-child and pasted the code as below. But still the WP LOGO is there.
<?php
//
// Recommended way to include parent theme styles.
// (Please see https://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
//
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array(‘parent-style’)
);
}
//
// Your code goes below
//
function remove_wp_logo( $wp_admin_bar ) {
if ( !current_user_can( ‘administrator’ ) && !is_super_admin() ) {
$wp_admin_bar->remove_node( ‘wp-logo’ );
}
}
add_action( ‘admin_bar_menu’, ‘remove_wp_logo’, 999 );
Please ignore the above message. I realize now that i the logo is there because i am logged in as the admin. Others users cannot access it.
Many thanks.
source : https://buddypress.org/support/topic/how-do-i-remove-the-link-to-wordpress-org-in-my-buddypress-notification-bar/