• Resolved patchworkcloud

    (@patchworkcloud)


    How can I add the date and time of the post to the post title of the posts on the front page (non-static) of twenty twelve?

    I have successfully added it to the single post page by adding a php call to the content.php file’s entry-header div like so:

    <?php the_post_thumbnail(); ?>
    			<?php if ( is_single() ) : ?>
    			<h1 class="entry-title"><?php the_time('F j, Y'); ?><br />
    			<?php the_title(); ?></h1>
    			<?php else : ?>

    Once again, this changes the single post page but not the appearance of post-titles on the front-page.

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter patchworkcloud

    (@patchworkcloud)

    My changes to content.php did not display on the non-static homepage because I only added it to the <? php if ( is_single() ) : ?> consequent and not the else alternative.

    I added the same <?php the_time(‘F j, Y’); ?> to the else of the conditional and got exactly what I wanted.

Viewing 1 replies (of 1 total)
  • The topic ‘Add date and time to post-title on non-static front page (twenty twelve)’ is closed to new replies.