• I’ve seen other posts saying to use the_time instead of the_date. However, can someone tell me what to replace the line below with to make it look exactly the same as before…
    <**?php the_date(”,'<h2>’,'</h2>’); ?**>
    I’ve tried about 2 dozen combinations but cannot figure out what goes in between the parens to maintain the same font properties (font type, weight, etc) using the_time as I had when using the_date. I’m using the standard mm/dd/yyyy. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter johannmon

    (@johannmon)

    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.

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

    Thread Starter johannmon

    (@johannmon)

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show date on every post, but maintain formatting’ is closed to new replies.