• Resolved Seamhead

    (@seamhead)


    Hello,

    My website (http://www.seamheads.com)includes a handful of categories on my index page, starting with “Top Stories,” which shows the date of the latest post. The other categories, however, don’t show the dates of the posts. Is there a simple way to get the dates of these posts to display as it does in the “Top Stories” section?

    Any help would be appreciated.

    Thanks!
    Mike

Viewing 6 replies - 1 through 6 (of 6 total)
  • MichaelH

    (@michaelh)

    Could be you need to use the template tag, the_time(), rather than the_date(), in your template.

    Quote from the_date()

    SPECIAL NOTE: When there are multiple posts on a page published under the SAME DAY, the_date() only displays the date for the first post (that is, the first instance of the_date()). To repeat the date for posts published under the same day, you should use the Template Tag the_time() with a date-specific format string.
    Use <?php the_time(get_option(‘date_format’)); ?> to add the date set in the admin interface. (if you have problems, try removing the quotes around date_format. Both seem to work.)

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

    Thread Starter Seamhead

    (@seamhead)

    Just tried that and nothing happened. I even removed the quotes. Any other suggestions that I might try?

    MichaelH

    (@michaelh)

    With the help of the Template Hierarchy article, determine what Template is displaying those posts. Then please paste all the code from that template into a pastebin such as wordpress.pastebin.com, and report the link back here.

    Maybe someone can spot your problem. Thanks.

    Also provide a link to download the theme you are using.

    Thread Starter Seamhead

    (@seamhead)

    If I did this correctly, here’s the code:

    http://wordpress.pastebin.com/mZQTxDQ5

    Here’s the theme I’m using:

    http://www.studiopress.com/themes/news

    Thanks!

    MichaelH

    (@michaelh)

    That template does look like it uses the_time() so look for other template files (e.g. home.php) in that theme folder that display posts and add the_time(). If necessary, ask the developer if they have any suggestions.

    Thread Starter Seamhead

    (@seamhead)

    Worked like a charm! Thanks for all your help.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Adding a date stamp’ is closed to new replies.