WordPress.org

Support

Support » Plugins and Hacks » Removing YOAST metabox for authors

Removing YOAST metabox for authors

  • I’m trying to remove YOAST metabox in my Add New Post page only for non-admins.

    I came across this instruction but I’m not really sure how it works.

    I have 2 questions:

    1. (A really dumb one, sorry!) Is this code supposed to go on pont-new.php file? There’s no reference about where I should place it in the Codex link and I have less than basic knowledge on this.

    2. How do I find out if the $context is Normal or Advanced?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Should be able to do this in teh default settings:

    /wp-admin/admin.php?page=wpseo_dashboard

    Go to Hide WordPress SEO box on edit pages for the following post types: and pick ‘posts’ – That does hide it for everyone, HOWEVER. You can still activate it if you want.

    It’s a custom post type, so wpseo dashboard does not help me 🙁

    The example here

    if (is_admin()) :
    function my_remove_meta_boxes() {
     if(!current_user_can('administrator')) {
      remove_meta_box('sqpt-meta-tags', 'post', 'normal');
     }
    }
    add_action( 'admin_menu', 'my_remove_meta_boxes' );
    endif;

    would actually be perfect. Too bad I cant make it work.

    CPTs show up on that page for the option as well.

    That code isn’t working because it’s a CPT though 🙂

    remove_meta_box('sqpt-meta-tags', 'post', 'normal');

    Change POST to whatever your CPT slug is.

    Hi, do you know if Hide WordPress SEO box on edit pages for the following post types option disappeared in last version 1.2.2. Can’t find it!

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Removing YOAST metabox for authors’ is closed to new replies.