Support » Fixing WordPress » How to code the Date of post, as a single header on top of all posts for the day

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



    most themes do that by default, the date part, minus the font size. you have not provided a link to your site, and im not going to look through hundreds of themes to see if I can find one that doesnt handle them that way, so I can only assume yours does as well– perhaps youve yet to post twice in one day, so you dont even know it.

    the font size is controlled via your CSS, look for H2 or H3 and style it from there.

    My website is here:

    As you can see, this theme inserts a small date under each post title.




    Ok, that helps. if you look at your themes index.php, that date on every post is being called with the following:

    <?php the_time('F jS, Y') ?>

    the first step toward what you want is removing that bit of code from your index.php

    The second bit (putting back one date for each day) is done by adding this:

    <?php the_date('','<h2>','</h2>'); ?>

    Putting the above line immediately below the following line:

    <?php while (have_posts()) : the_post(); ?>

    should achive what you want.

    you will get one big date enclosed with h2 tags that you can style to your liking in your css.

    Just check it how it is done in the Classic theme – it works exactly the way you want it.

    Great! Thanks guys! One tiny problem now — If you check the site, theres a “; ?>” after the name of the one made the post.

    July 4, 2006
    4th of July Tribute to the Troops
    Blogged in Misc., War on Terrorism by Dave; ?> <— how to get rid of this?

    Should be a simple fix but I’m a bit php-challenged ;D

    You should check the index.php file where “the_author” tag is and see if there is anything in “plus” there.

    Also, you should work on your stylesheet, so that the subcategories get a bit bigger font size (they are nested lists).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to code the Date of post, as a single header on top of all posts for the day’ is closed to new replies.