WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Christopher Roberts
    Member
    Posted 1 year 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' ) ); ?>
    </h2>

    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?

    Thanks

  2. Bas Schuiling
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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