WordPress.org

Ready to get started?Download WordPress

Forums

How to show author on front page (8 posts)

  1. JesusNinja13
    Member
    Posted 3 years ago #

    I'm using the Pilcrow theme, and there's no option to show the author on the front page. I run a multi-author blog, and it would be great if the reader knew who wrote the post before clicking on it.

    Any way I can do this?

  2. Adam Losier
    Member
    Posted 3 years ago #

    You can open up your index.php file and add something like this in the proper area.

    <php
    if(is_home()){
    the_author_link();
    }
    ?>
  3. JesusNinja13
    Member
    Posted 3 years ago #

    That's not doing anything for me. Would adding that to the loop.php help?

  4. ulyssesr
    Member
    Posted 3 years ago #

    <?php the_author_link(); ?> must be within the Loop.

    http://codex.wordpress.org/Function_Reference/the_author_link

  5. JesusNinja13
    Member
    Posted 3 years ago #

    I've tried adding that inside the loop, but it's not affecting the front page. It shows up then on the archive pages, but not on the front page.

  6. ulyssesr
    Member
    Posted 3 years ago #

    Is your front page home.php? or another custom page? For the author link to show up, you must have be within the Loop or within a single post. If not, you may have to use the_author_meta() and provide the author's ID.

    http://codex.wordpress.org/Function_Reference/the_author_meta

  7. JesusNinja13
    Member
    Posted 3 years ago #

    It's index.php. I put that within the loop, but it only shows it if it's not on the front page (i.e. Archives page).

  8. Adam Losier
    Member
    Posted 3 years ago #

    If your using a static front page instead of the default it may have to go under the page.php or single.php file.

Topic Closed

This topic has been closed to new replies.

About this Topic