WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove post fields for specific User Role (2 posts)

  1. bweb79
    Member
    Posted 3 years ago #

    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');
  2. bweb79
    Member
    Posted 3 years ago #

    Realized I posted this in the wrong section. New post in the right area.

    http://wordpress.org/support/topic/remove-post-meta-fields-based-on-user-role?replies=1#post-1822418

Topic Closed

This topic has been closed to new replies.

About this Topic