As promised, I’m now going to teach you guys how to code your Date icon.

In order to make this icon into code, you need to understand what will happen. What we’re going to do is use divs to align the Month, and the Date inside another div with a background. The background image will be our date icon, and we’ll use CSS to overlay our text where it belongs.

Now, for this tutorial, I’m going to assume you already know a bit of xhtml and CSS.

Step one.

First, you need to save your date icon image. Now, make sure you save it, without the text visible. Remember, we’re coding this into wordpress so that it automatically updates itself with every post, rather then manually by saving a new image. So, we need to remove the text first.

Step Two.

Now, we’ll lay out the base structure. Following the wise words of Small Potato, type out all the code, don’t copy and paste.

Remember, you should have typed that out.

Now, explaining each part.

  • : This opens our month div, called month. This will hold our Post’s Month.
  • : This is a php tag. Using Wordpress’s system, it calls up the time of the post made (the_time), and writes it as a month ((’M')).