Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    We’re planning on adding better support for this eventually, but in the meantime you can use the aioseop_add_post_metabox filter hook.

    Hello,

    I created a custom post type.
    I’m trying to remove the AIOSP meta box using this code for authors only.

    function remove_aiosp_meta_box() {
    $current_user = wp_get_current_user();
    if(!in_array(‘administrator’,(array)$current_user->roles) ) {
    remove_meta_box(‘aiosp’, ‘myposttype’, ‘normal’);
    }
    }
    add_action(‘do_meta_boxes’, ‘remove_aiosp_meta_box’);

    But the meta boxes keeps on my post type even.

    I also have User Role Editor plugin were Authors have no capabilities for aiosp_manage_seo.

    How should i do to remove the metabox for authors.

    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove meta box for authors’ is closed to new replies.