Announcement

Collapse
No announcement yet.

Hide Labels from Editors

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hide Labels from Editors

    Hello,
    I'm locking down the dashboard for my users with the 'editor' role. I've gotten about 99% of the way there with the Adminimize plugin.

    I'd like to hide the 'Extender Labels' from them. (I'm currently using Beaver Extender, but I'm sure it applies to Genesis Extender and DWB).

    Has anyone successfully done this?

    TIA
    Craig
    Last edited by berryc; 02-25-2017, 12:41 AM. Reason: labels, extender, dashboard

  • #2
    You could place this in custom-functions - this will 'hide it' from everyone except admins.


    PHP Code:
    // remove extender labels from editor screens for all >> except admin rights
    if (! current_user_can'manage_options' ) ) {
      function 
    custom_admin_styles() {
        echo 
    '<style>#genesis_extender_labels{display:none!important;}</style>';
      }
      
    add_action'admin_head''custom_admin_styles' );
    } else {
       
    // admin rights

    Comment


    • Sogwap
      Sogwap commented
      Editing a comment
      Make sure "Affect Admin" is checked!

  • #3
    Alternative method -

    PHP Code:

    // remove extender labels meta box
    if (! current_user_can'manage_options' ) ) {
      function 
    remove_extender_labels_metabox(){
      
    remove_meta_box'genesis_extender_labels','post','normal' ); // On Edit Post
      
    remove_meta_box'genesis_extender_labels','page','normal' ); // On Edit Page
      
    remove_meta_box'genesis_extender_labels','my-cpt-name','normal' ); // On a Custom Post Type named 'my-cpt-name'
    }
    add_action'do_meta_boxes''remove_extender_labels_metabox' );
    } else {
      
    // admin 

    Comment

    Working...
    X