Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Missing Custom Role Author Name

Discussion in 'Misc WordPress Requests' started by SirStuey, Nov 17, 2017.

  1. SirStuey

    Guest

    Missing Custom Role Author Name, by SirStuey

    I have a contributor with custom title and custom permissions, given a “contributing editor” role.

    His name is not included in the posts’ authorship field. I cannot transfer a draft or post to his name – his name is missing from the list. How can I add his name back to the list? If I switch his role back to a standard role, his name reappears in the list.

    The change was made a year ago. I cannot tell if this is a recent break, or something that was broken from the start.

    //Special Role Creation

    $result = add_role(
    ‘contributing_editor’,
    __( ‘Contributing Editor’ ),
    array(
    ‘read’ => true, // true allows this capability
    ‘edit_posts’ => true,
    ‘delete_posts’ => true, // Use false to explicitly deny
    ‘upload_files’ => true,
    ‘moderate_comments’ => true,
    ‘edit_others_posts’ => true,
    )
    );
    if ( null !== $result ) {
    echo ‘Yay! New role created!’;
    }
    else {
    echo ‘Oh… the contributing_editor role already exists.’;
    }

    Thank you!

    Missing Custom Role Author Name
     
    #1

Share This Page

Web Hosting