How to Insert the Calendar Tag into a Template on WordPress

Hi guys, welcome to BuildMySiteForFree.com. In today’s tutorial, I’m going to show you how to insert a calendar tag into a template in order to display a calendar on your blog. And not only will this display a calendar on your blog but it’s also
gonna highlight each day of the week in which you posted a blog. So what’s great about this is all of your followers who are following your blog every day can look at this calendar, see all of the different days that you have posted a blog, whether it’s anywhere from January to December. They can click on any month or any date and once they click on it it will bring them to a page that  shows all the posts that you created for that date that they put for that date that they clicked.

So it’s actually a really cool thing to have, and to get started what you want to do is come down to your ‘Appearance’ setting on the navigation menu and you’re going to scroll down to where it says ‘Editor’ and this will bring you to the edit themes and templates page.

So right here on the right hand side is a list going all the down of different templates and styles. So we have our ‘page template’, our ‘search results template’, ‘sidebar template,’ the list goes on. And usually people want to insert a calendar into either their footer,  their header, or
their sidebar template. So what you wanna do next is pick a template. So today we’re gonna just insert this code into the footer template. So I will click  here where it says footer. It will bring me to the footer editor page and there are two different codes I can type in. So the first code is this one right here that I’m highlighting, and I will also put it up on the screen, and this one says “true” in it. So after I update this file, my calendar is gonna show the month and all the dates  but instead of having it have an abbreviation of each day it’s just gonna have one letter. So for Monday it will just say “M,” for Tuesday it will say “T,” Wednesday “W,” and so on.

So if I update this file and then go back to my blog and scroll all the way down, in our footer template is our calendar. And if you notice it’s just like we chose the parameter to be, with the one letter of each day. So we have “M,” “T,” “W,” standing for Monday, Tuesday, Wednesday and so on. And if you notice here all the different dates that are highlighted in a different color are underlined for each time I created a post.

So now if we want to go back and change this type of parameter what we could do is scroll back down on our footer editor page and this time insert the same code but instead of “true” you want to insert “false” in the parenthesis. This will change your calendar to actually have the three-letter abbreviation so Monday will be Mon, Tuesday T-U-E and so on. So you’d enter that same code except change the true to the false, you’d  update the file, and then when we go back to our blog page and scroll all the way down, we have  that same calendar in the same footer template  but instead the abbreviations have changed for each day of the week.

.And this is how you insert a calendar tag into a template. Stay tuned for more videos.

Print Friendly, PDF & Email

About the Author

Andy Johnson

Andy Johnson has been on the Internet since the its dawn(ie his first computer program was recorded on cassette tape) and his first hard drive cost about as much his current MacBook. His first byline was in 1993 for a local newspaper rag he eventually helmed, and his last “real job” was at a computer start up which ended when it ended. Throughout it all he’s freelanced and blogged. Now he is mesmerized by Search Engine Optimization forever trying to “rise to the top” for the right reasons. He’s been married to his wife Julia for as long as he can remember and has two lovely, wonderful children. He looks forward to sharing the latest in the technical best for all the online entrepreneurs.