Add year to post flag

Latest Reply from skwaller at 2015-11-24 10:52:02 Solution
I would like to add the year to the month and day to the little flag that drapes down on a post.

This "flag":
http://liverpooltwp.org/site/wp-content/uploads/2015/02/flag.png

I think this is the area to add to, but what I added at the bottom doesn't work lol

.articles .post-date {
height:77px;
width:67px;
background:url(images/post-date.png) left top no-repeat;
display:block;
position:absolute;
left:0;
top:-14px;
font-family:'Oswald';
text-align:center;
color:#fff;
text-shadow:1px 1px 1px #441b15;
}
.post-date .day{
font-size:24px;
}
.post-date .month{
font-size:16px;
}
.post-date .year{
font-size:16px;
}
Found the code in theloop.php :-)
What markup did you add to the loop to get the year to appear? Was there any issue making it fit into the flag area? Thanks!
Hi!
You need to edit the code:
<span class='day'><?php echo get_the_date('d'); ?></span><br /><span class='month'><?php echo get_the_date('M'); ?></span>

inside the theloop.php file of the theme.
However, this flag is an image and its width is not enough for the full date.
Guess I'll include the full date at the end of each post then. Thanks!

Leave a reply

Add codeAdd image