Skip to content
Public Ticket #31990

Remove Posts Options for non-admin users

Conversation thread

UCLAStudentMedia replied

Customer Reply

Thanks. It worked.

PenciDesign Supporter replied

Staff Reply

Hi,

You should paste this code into the function.php of the child theme or via the CodeSnippet plugin here: https://wordpress.org/plugins/code-snippets/

add_action( 'add_meta_boxes', function() {
    // Only allow admins to see this metabox
    if ( ! current_user_can( 'administrator' ) ) {
        remove_meta_box( 'penci_custom_sidebar_page', null, 'advanced' );
        remove_meta_box( 'penci_view_count_custom', null, 'side' );
    }
}, 99 );

Regards,
PenciDesign.

UCLAStudentMedia started the conversation

Conversation Start

Hello, when I go to a single post I see at the bottom options like "Options for this post/page" and "smart Lists settings for this post" (see attached screen shot)

Is there a way to disable this from showing up to non-admin users? I don't want anyone other than an admin user to be able to configure these settings.

Want to join this conversation or access attachments? Sign in first.