• Just wondering what I need to change so that the Date/Time stamp of my post appears above the post title?

    Thanks.

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

    (@themesbycal)

    Do you want to change that on the index page or the single post page? Each uses a different file.

    Single Posts use single.php and other pages usually use index.php(the ones that list multiple posts)

    If you let me know that, I can help you further.

    Thread Starter dtsports

    (@dtsports)

    Hey Cal …

    I’m guessing the Index, but wouldn’t I want it to be changed on both?

    Cal

    (@themesbycal)

    yeah probably….lol guess I should have assumed that…

    okay, here’s the code that displays the date/time

    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>

    So if your index.php looks like this

    <div class="post" id="post-<?php the_ID(); ?>"><h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>

    Change it to look like this

    <div class="post" id="post-<?php the_ID(); ?>">
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

    I didn’t test this, but it should work and hopefully you get what I’m doing by seeing the change…

    Note: copy and pasting this may not work…..

    Thread Starter dtsports

    (@dtsports)

    Thanks Cal … I’m having a bit of trouble as some of the code looks just different enough to scare the crap out of me .

    <h2 id="post-<?php the_ID(); ?>" class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    
    <small class="title">It's <?php the_date('l') ?> <?php the_time('F') ?> the <?php the_time('jS') ?> around <?php the_time('g:i A') ?>
    
    </small>
    Cal

    (@themesbycal)

    no problem, this should work

    <small class="title">It's <?php the_date('l') ?> <?php the_time('F') ?> the <?php the_time('jS') ?> around <?php the_time('g:i A') ?></small>
    
    <h2 id="post-<?php the_ID(); ?>" class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

    All I did was put the date above the h2 tag, that should work….

    Thread Starter dtsports

    (@dtsports)

    Thanks for your help Cal!

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

The topic ‘Date/Time THEN Post Title’ is closed to new replies.