Styling entry_date
-
Hi,
I want to style the date of the post in a box like below with a background color:
Dec
31
2011I have read many forums that say use some php lines like:
<div class="date-month"><?php the_time('M'); ?></div> <div class="date-day"><?php the_time('d'); ?></div> <div class="date-year"><?php the_time('Y'); ?></div>
But I am not sure where I should put this piece of code. In loop.php or function.php? and do I have to substitute any other piece of code?
I am using twentey-ten theme and I found this code in function.php that last line seems to be responsible for outputting the date:[please use the code button to mark your code and to keep from getting distorted – see https://codex.www.ads-software.com/Forum_Welcome#Posting_Code ]
function twentyten_posted_on() { printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ), 'meta-prep meta-prep-author', sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>', get_permalink(), esc_attr( get_the_time() ), get_the_date() ),
Does anybody know what to do for this please?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Styling entry_date’ is closed to new replies.