Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #4516844
Remove Posts Options for non-admin users
Open

Comments

  • UCLAStudentMedia started the conversation

    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.

    Attached files:  Screenshot 2025-11-16 at 4.11.14 AM.png

  •  3,017
    PenciDesign replied

    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.