• Hi there, i set up advanced custom field editor for my custom type posts.. now i’m develeoping how to hide native editor for the only author role..

    This code works, but for every role..((

    // Remove editor
    function remove_editor() {
      remove_post_type_support('post','editor');
    }
    add_action('admin_init','remove_editor');

    anyone know how to trim only for authors?

    http://wordpress.org/extend/plugins/advanced-custom-fields/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter David Klhufek

    (@brtak)

    Found it, this code works fine..

    // Remove editor only if author
    function remove_editor() {
    if( current_user_can( 'author' ) ){
    remove_post_type_support('post','editor');
    } // only if author
    }
    add_action('admin_init','remove_editor');
    Thread Starter David Klhufek

    (@brtak)

    🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove editor only for author role’ is closed to new replies.