Forums

[resolved] Need help with a template tag (5 posts)

  1. djcayenne
    Member
    Posted 3 years ago #

    I have installed WP 2.0, and I have begun moving my blog on over. I love it, but I know nothing about XHTML. I need help with a Template Tag. I'd like to have a tag that shows up on each post that reads as follows: Posted by Author X on Month xx, 2006 at 2:30 PM. Any help on what that template tag would look like? Where would I insert the template tag so that it shows up on all posts including the archived posts? Thanks.

  2. Viper007Bond
    Member
    Posted 3 years ago #

    In your post Loop in index.php, single.php, archive.php, etc. (wherever needed):

    Posted by <?php the_author(); ?> on <?php the_time('F d, Y'); ?> at <?php the_time('d:i A'); ?>

    See for more documentation:

    http://codex.wordpress.org/Template_Tags/the_author
    http://codex.wordpress.org/Template_Tags/the_time
    http://codex.wordpress.org/Formatting_Date_and_Time

  3. djcayenne
    Member
    Posted 3 years ago #

    Thanks! I'll try it out now.

  4. djcayenne
    Member
    Posted 3 years ago #

    Awesome. Here's a similar question. Do I insert this into the loop from the Dashboard Theme Editor (which is what I just did for the main page template) or do I need to edit the files at the main directory via FTP?

  5. Viper007Bond
    Member
    Posted 3 years ago #

    Either will work.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags