[wp-hackers] Styling of "post date"

Allan Mertner amwp at mertner.com
Sat Sep 11 23:20:33 UTC 2004


Hi,

I would like to suggest a small change to index.php to allow better 
control over the style of the date/timestamp of the post.

The change is trivial: change

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

to

   <?php the_date('','<h2 class="postdate">','</h2>'); ?>

With this change, the default behaviour is unchanged, but people can add 
a .postdate style to make it look different if they want.  For example, 
I use the following to achieve the effect I need:

.postdate {
   font-variant: small-caps;
   font-size: large;
   float: left;
   border-right: 1px solid #ccc;
   padding-right: 3px;
   width: 3em;
}

Is this the right way and the right place to post this? :)

Thanks,
Allan





More information about the hackers mailing list