Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #5079

    Hello – I’d like to add “by <author” piece of text to each post’s entry head right next to the comment count and category.

    Screenshot of a photoshoop that explains what I’m trying to do:

    I know the fix would involve adding another entry to this piece of code on basically every page that displays posts:

    <div class=”entry-head”>

    <span class=”comments”><?php comments_popup_link(__(‘No Comments’,’habitat’), __(‘1 Comment’,’habitat’), __(‘% Comments’,’habitat’)); ?></span>

    <span class=”categories”><?php the_category(‘, ‘); echo $terms; ?></span>


    I think a new CSS rule would need to be created. Can anyone help me out with how to do this?



    you can use this function: to display the author.

    Use it like:

    <span class="author"><?php the_author(); ?></span>


    Thanks! One other question – how do I get a little icon next to that line, like the category and comment count have?


    1) You need to add your new element to following code in style.css:

    .entry-head .comments, .entry-head .categories, .tag_list .the_tags{

    2) You need to add an icon – you can use the comments code with a different image – the code can be found in style1.css:

    .entry-head .comments{
    background:url("../images/shared/icon_comment.png") no-repeat scroll left center transparent;

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Add "by Author" to post entry head’ is closed to new replies.