Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #384109

    I know there are plugins to restrict access to certain sections on WordPress, so for example edit_options will allow a user to get to the Enfold theme options page. However, I’m interested in having a user account only be able to, for example, have access to the General Styling tab. I don’t really want them to be able to change or mess up page layouts and such. Is there a way to do this or has anyone had luck with any other plugins?

    • This topic was modified 9 years, 11 months ago by albertoSSC.
    #384155

    Hi!

    The whole Theme Options page is a single page, the sections are just divisions that hide/show depending on the user selection. However, one thing you could do is hide the options with CSS, try adding this to theme / child theme functions.php:

    if( get_current_user_id() == 1 ) { add_action('admin_print_scripts', 'custom_admin_css_func'); }
    
    function custom_admin_css_func() {
    	?>
    <style type='text/css'>
    #wp-admin-bar-avia,  .avia_shop_option_link, 
    .goto_theme_options,
    .goto_general_layout,
    .goto_general_styling,
    .goto_advanced_styling,
    .goto_header,
    .goto_sidebar_settings,
    .goto_footer,
    .goto_blog_layout,
    .goto_social_profiles,
    .goto_demo_import,
    .goto_importexport,
    .goto_theme_update
    {
    	display: none !important;
    }
    </style>
    <?php
    }
    

    Change “1” by the user ID you want to affect and adjust the sections you want to hide/show.

    Cheers!
    Josue

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