Forums

Show date on every post, but maintain formatting (3 posts)

  1. johannmon
    Member
    Posted 8 years ago #

    Here is a partial listing of things I've tried, along with at least a dozen other things that return parse errors.
    <?php the_time('<h2>"m/d/Y"</h2>'); ?> returns <122>"11/29/2004"
    <?php the_time('','<h2>"m/d/Y"','</h2>'); ?> returns 12:28pm
    <?php the_time('<h2>',"m/d/Y"</h2>'); ?> returns 11/29/2004 (but not the same header font as displayed with the_date)
    <?php the_time('m/d/Y','<h2>','</h2>'); ?> returns 11/29/2004 (but not the same header font as displayed with the_date)
    Has anyone figured this out? I cannot find anything anywhere on this. All I want to do is show the date on every post, and show it exactly as it appears now.

  2. Joshua Sigar
    Member
    Posted 8 years ago #

    How 'bout
    <h2><?php the_time('m/d/Y'); ?></h2>

  3. johannmon
    Member
    Posted 8 years ago #

    Hey, that did it! Thanks. Not sure why the h2's were within the parens with the other command, but not this one.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.