• Hello,

    I have this plugin working with wordpress 4.0 absolutely perfectly… (Thank You)…

    I’m now in a situation where I need to disable the expiration meta-box for Authors of a post, but not the admins… (So they can not change the expiry date).

    Is this something anybody could potentially help with?

    Thank you!

    https://www.ads-software.com/plugins/post-expirator/

Viewing 1 replies (of 1 total)
  • Thread Starter jst88

    (@jstones88)

    For anybody else interested in a solution, I Managed to do it by adding this code to the theme’s functions.php file and it worked a treat:

    if (is_admin()) :
    function my_remove_meta_boxes() {
     if( !current_user_can('manage_options') ) {
      remove_meta_box('expirationdatediv', 'post', 'normal');
     }
    }
    add_action( 'admin_menu', 'my_remove_meta_boxes' );
    endif;
Viewing 1 replies (of 1 total)
  • The topic ‘Disable Expiration Meta-Box from Authors’ is closed to new replies.