Hacking the Calendar
-
Hey guys I would like to hack my calendar widget so that it displays the month/year of the currently viewed post. So say I view a post from last November, it’d show November 2006 for the calendar. After some searching I found that the function get_calendar is in template-functions-general.php. I figure I have to replace the $year, $month, and $weekday. Possibly the other globals that are imported into that function’s scope.
The reason I haven’t advanced was because I don’t know how to get the information for the currently viewed post. After getting something like the Post ID I could simply query the database.
I think I read somewhere that if one’s permalinks are in a certain format then it would automatically work, however I don’t want to change to that permalink structure for certain reasons.
I would appreciate any input on this, thanks.
- The topic ‘Hacking the Calendar’ is closed to new replies.