[Resolved] Remove WP Show Posts Menu Item for Editors

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Remove WP Show Posts Menu Item for Editors

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1465
    Daniel
    Participant

    Is there any way to remove the WP Show Posts menu item from the admin area?
    I would only like it to show for Administrators.

    #1469
    Tom
    Keymaster

    Hi Daniel,

    Give this function a try:

    add_action( 'admin_menu', 'wpse28782_remove_menu_items' );
    function wpse28782_remove_menu_items() {
        if( !current_user_can( 'administrator' ) ):
            remove_menu_page( 'edit.php?post_type=wp_show_posts' );
        endif;
    }
    #1471
    Daniel
    Participant

    Perfect, you da man 🙂

    #1477
    Tom
    Keymaster

    Glad it worked 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.