WordPress.org

Ready to get started?Download WordPress

Forums

Esquire
[resolved] Adding an author byline to the posts (2 posts)

  1. Emily
    Member
    Posted 1 year ago #

    Hi,

    I've got my site almost to the point I want it. I created this code to allow for Google + crawling of my multiple bloggers, and I put it in the content.php file.

    <p class="vcard author"><span class="fn">
          <?php $getid = $posts[0]->post_author; if($getid == 1){ ?>
          <?php } else { ?>
          by
          <?php the_author(); ?>
          <?php } ?></span>
    <span class="updated"><?php the_time(get_option("date_format")); ?></span>
    </p>

    Unfortunately, this is pushing down the content on my pages in addition to the post pages, which I don't want. Since Esquire doesn't have a single.php file, has anyone figured out a good way to give author credit to posts without effecting other pages?

    Site: http://www.oh-i-see.com/blog/

    Thanks,
    Emily

  2. Emily
    Member
    Posted 1 year ago #

    I fixed it.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic