• Hi,

    i am using the following function to hide the attributes meta box.

    function customize_meta_boxes() {
      remove_meta_box('pageparentdiv','page','normal');
    }
    add_action('admin_init','customize_meta_boxes');

    It works quite well, but i still want the meta box to be visible for admins.

    1. Is that possible?
    2. Is there a way to put someting like this into my theme options? => set_page_template(TEMPLATENAME, SITEID)

    Thanks a lot!
    Jan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Jan,

    Have you tried

    if( !current_user_can('level_10') ) {
       add_action('admin_init','customize_meta_boxes');
    }
    Thread Starter Jan K.

    (@90jkrug)

    No i did not.. – works perfectly now! Thank you.

    What about my second question?

    Does WordPress offer any function like this? => set_page_template(TEMPLATENAME, SITEID)

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I believe there is a way to do that, but it will need looking up once I get off of this train. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘hide meta boxes only for users, not for admins’ is closed to new replies.