Responsive WordPress Theme – Caliber

A theme with simple controls and limitless potential. Work fast and build an amazing website!   Find out more »

UpThemes – Beautiful WordPress Themes

Create a site your church, gallery, newspaper, blog, recipes, band and more!   See the themes »

Need a little help?  Find answers quickly by searching the forum.
Group Admins
  • andy
  • jeffw

Support for: Razor: Cutting Edge WordPress Theme

Razor

Public Group  |  active 1 year, 9 months ago ago
Viewing post 1 to 2 (2 total posts)

Get rid of the Layout Options and Design Options metaboxes for posts?

  • boucha

    said

    How do I get rid of the meta boxes on Posts. Layout Options and Design Options, what file is adding those to the page?

  • jeffw

    said

    To remove those metaboxes from the post edit page for all user roles, add this code to your ‘functions.php’ file…

    // removes layout options and design options metaboxes
      function izzy_wizzy_lets_get_busy() {
        remove_meta_box('layout-options','post','side');
        remove_meta_box('design-options','post','side');
      }
      add_action('admin_head','izzy_wizzy_lets_get_busy');

    To remove those metaboxes from the post edit page for all user roles except administrators, add this code to your ‘functions.php’ file…

    // removes layout options and design options from all but administrators
    if (!current_user_can('manage_options')) {
      function izzy_wizzy_lets_get_busy() {
        remove_meta_box('layout-options','post','side');
        remove_meta_box('design-options','post','side');
      }
      add_action('admin_head','izzy_wizzy_lets_get_busy');
    }

    References:
    https://codex.wordpress.org/Function_Reference/remove_meta_box
    https://codex.wordpress.org/Function_Reference/add_action
    https://codex.wordpress.org/Function_Reference/current_user_can
    https://codex.wordpress.org/Roles_and_Capabilities

Viewing post 1 to 2 (2 total posts)