« Nutty Professor Part 2 Group hug!!! Oh horror »

Tweaking the calendar

:: Saturday, Oct 9th 2004 @ 23:10 :: Tweaks, WordPress ::

My calendar didn’t have a link to the current month, so I added it. There’s a function called get_month_link(year,month) which returns the URL to a monthly archive page (not the link). So, I put it in some <a> tags:

<caption><a href="'.get_month_link($thisyear,$thismonth).'"><img src="'.get_settings('siteurl').'/image location/'.$month[zeroise($thismonth, 2)].'.gif" /><img src="'.get_settings('siteurl').'/image location/'.date('Y', $unixmonth).'.gif"></a></caption>

Of course, if you don’t have images in place of the original texts, you just put the link part around what there is in the <caption> of the calendar table. Basically it’s

<caption><a href="'.get_month_link($thisyear,$thismonth).'">whatever you do to get the month and year</a></caption>

No Comments

RSS feed for comments on this post.

No comments yet.

Sorry, the comment form is closed at this time. You can leave a comment here