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.
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
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.
https://codex.wordpress.org/Child_Themes
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.