helloeng on "[Plugin: Yoast SEO] How can I hide "SEO" from wp admin bar"

ساخت وبلاگ

helloeng
Member
Posted 6 months ago #

Hi

How can I hide/remove the "SEO" from my wp admin bar? I can't find such an option in the settings.

See screenshot for what I mean

http://ptscr.com/9u9uzo

Thanks

https://wordpress.org/plugins/wordpress-seo/

helloeng
Member
Posted 6 months ago #

Nope thanks. I asked to hide the

Yoast SEO menu

from the adress bar, NOT the whole address bar.

This topic is NOT resolved.

I don't know why you would want to do that, but maybe this will help

https://digwp.com/2011/04/admin-bar-tricks

I know why you might want to do this, maybe similar to my "why..." The links above are all about removing the whole admin bar, no knowing why one would want to do that... :-)

Here is what I just found that does it nicely... Add to the top of a child theme's functions.php file via Appearances > Editor

/* Remove SEO Menu in Admin Bar
*/
function mytheme_admin_bar_render() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wpseo-menu');
}
// and we hook our function via
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );

Kind regards...

helloeng
Member
Posted 11 minutes ago #

Thank you, crzyhrse!

Your code works ;-)

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 289 تاريخ : پنجشنبه 14 مرداد 1395 ساعت: 16:21