Display author status - i.e. author, admin, editor etc. (3 posts)

  1. Christopher Roberts
    Posted 3 years ago #

    Anybody know how I would go about adding an authors status/role to their profile?

    Currently on the author.php page, this code:

    <h2><?php printf( esc_attr__( 'About %s', 'twentyten' ), get_the_author_meta( 'user_firstname' ) ); ?>

    returns this on my profile:
    "About Christopher"

    I want to display:
    "About Christopher - Admin"

    The blog has lots of writers, so another example would be:
    "About Jonny" that I want to display as "About Jonny - Author"

    Any ideas on the function I need?


  2. Bas Schuiling
    Posted 3 years ago #

    You can probably get the information from user_level in the author field en then use get_role to find the text value of that role

  3. Christopher Roberts
    Posted 3 years ago #

    Thanks for the help, I am a little confused as to the exact code I would need to use. Would you be able to help?

Topic Closed

This topic has been closed to new replies.

About this Topic