Remove post fields for specific User Role
-
I’m trying to learn php, but am not very good with it yet. I’m trying to delete some post fileds for specific user roles. “Author” to be exact. This is what I have so far. It deletes the field for the “Author” role, but also for admin. I just want to delete the field for “Author’s”.
function remove_post_excerpt_field() { if($role=='author') remove_meta_box('postexcerpt', 'post', 'normal' ); } add_action('admin_menu', 'remove_post_excerpt_field');
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Remove post fields for specific User Role’ is closed to new replies.