[wp-hackers] Styling of "post date"

Allan Mertner amwp at mertner.com
Sat Sep 11 23:31:01 UTC 2004


Mark Shields wrote:

>I took it further and just made it a div.
>
><?php the_date('', '<div class="postdate">','</div>'); ?>
>  
>
I have done the same, but the default look is not the same if you do 
that.  I'd prefer a div or a span tag, but in the interest of backwards 
compatibility, I can live with h2 as long a class identifier is added.

Allan

>
>On Sun, 12 Sep 2004 00:20:33 +0100, Allan Mertner <amwp at mertner.com> wrote:
>  
>
>>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
>>
>>_______________________________________________
>>hackers mailing list
>>hackers at wordpress.org
>>http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>>
>>    
>>
>
>
>
>  
>





More information about the hackers mailing list