WordPress.org

Ready to get started?Download WordPress

Forums

Writr
[resolved] Author under Post Title, how? (3 posts)

  1. Phairdon
    Member
    Posted 5 months ago #

    Hi,

    I really like this theme. I need to be able to show who the author is below the Title of the Post on the homepage with my Gravatar, I kind of would like the date as well if possible.

    How can I add this?

    I did find out how to add an author box at the bottom of a post.

  2. maozillah
    Member
    Posted 5 months ago #

    Navigate to content_single.php and under

    <?php else : ?>
    			<span class="entry-format-badge genericon genericon-standard"><span class="screen-reader-text"><?php _e( 'Standard', 'writr' ); ?></span></span>

    Put
    <p>This post was written by <a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'View all posts by %s', 'writr' ), get_the_author() ) ) ?>" rel="author"><?php the_author(); ?></a></p>

    You can also go to template-tags.php and find
    // If more than 1 author display author name

    under that change
    if ( is_multi_author() ) :
    to
    if ( is_multi_author()==false ) :

    and it should display you if you're the single author in the meta section

  3. Thanks for the code suggestions, maozillah.

    Phairdon - just an important heads-up that the best way to make changes to a theme is to use a child theme, so your tweaks won't be overwritten when updating the theme. Here are some guides in case you haven't made one before:

    http://codex.wordpress.org/Child_Themes
    http://op111.net/53/
    http://vimeo.com/49770088

    Let us know if the above tweaks have the effect you want - they are a little bit different than your initial request.

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.