Adding "Posted by:" or something like that? (5 posts)

  1. thatguyjeff
    Posted 9 years ago #


    My site is:

    My wife authors posts from time to time, but there's nothing that sez who authored what. I would like to add something down by where it notes the category of the post that indicates who the author of the post was.

    If anyone could post some code and tell me where to put it, I would be eternally grateful.

    I'm one of those, figured it out by myself, never had any formal training, knows just enough to be really dangerous folks. So type slow.


  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    The classic theme has this line:
    <div class="meta"><?php _e("Filed under:"); ?> <?php the_category(',') ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?></div>
    In there, this part <?php the_author() ?> prints the name.

    That help ?

  3. techwench
    Posted 9 years ago #

    Kubrick has the_author() commented out.

    In index.php and/or single.php, look for something like this:

    <!-- by <?php the_author() ?> -->

    And delete the <!-- and -->

  4. thatguyjeff
    Posted 9 years ago #

    Groovy! That totally worked.

    I suppose, for the same deal to appear when posts are viewed from the archives, etc. I need to insert the same stuff in those pages as well?

    Any other pages besides the archives one?

  5. moshu
    Posted 9 years ago #

    Depending on your theme: archive.php, single.php. page.php.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.