{"id":152,"date":"2004-10-09T23:10:26","date_gmt":"2004-10-09T20:10:26","guid":{"rendered":"http:\/\/www.all-things-me.net\/blog\/archives\/2004\/10\/09\/tweaking-the-calendar"},"modified":"2010-08-12T02:06:21","modified_gmt":"2010-08-11T23:06:21","slug":"tweaking-the-calendar","status":"publish","type":"post","link":"https:\/\/www.all-things-me.net\/blog\/2004\/10\/09\/tweaking-the-calendar","title":{"rendered":"Tweaking the calendar"},"content":{"rendered":"<p>My calendar didn&#8217;t have a link to the current month, so I added it. There&#8217;s a function called <code>get_month_link(<i>year<\/i>,<i>month<\/i>)<\/code> which returns the URL to a monthly archive page (not the link). So, I put it in some &lt;a&gt; tags:<\/p>\n<blockquote class=\"php\"><p>&lt;caption&gt;&lt;a href=&quot;&#039;.get_month_link($thisyear,$thismonth).&#039;&quot;&gt;&lt;img src=&quot;&#039;.get_settings(&#039;siteurl&#039;).&#039;\/<strong>image location<\/strong>\/&#039;.$month[zeroise($thismonth, 2)].&#039;.gif&quot; \/&gt;&lt;img src=&quot;&#039;.get_settings(&#039;siteurl&#039;).&#039;\/<strong>image location<\/strong>\/&#039;.date(&#039;Y&#039;,  $unixmonth).&#039;.gif&quot;&gt;&lt;\/a&gt;&lt;\/caption&gt;<\/p><\/blockquote>\n<p>Of course, if you don&#8217;t have images in place of the original texts, you just put the link part around what there is in the &lt;caption&gt; of the calendar table. Basically it&#8217;s<\/p>\n<blockquote class=\"php\"><p>&lt;caption&gt;&lt;a href=&quot;&#039;.get_month_link($thisyear,$thismonth).&#039;&quot;&gt;<strong>whatever you do to get the month and year<\/strong>&lt;\/a&gt;&lt;\/caption&gt;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>My calendar didn&#8217;t have a link to the current month, so I added it. There&#8217;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 &lt;a&gt; tags: &lt;caption&gt;&lt;a href=&quot;&#039;.get_month_link($thisyear,$thismonth).&#039;&quot;&gt;&lt;img src=&quot;&#039;.get_settings(&#039;siteurl&#039;).&#039;\/image location\/&#039;.$month[zeroise($thismonth, 2)].&#039;.gif&quot; \/&gt;&lt;img src=&quot;&#039;.get_settings(&#039;siteurl&#039;).&#039;\/image location\/&#039;.date(&#039;Y&#039;, $unixmonth).&#039;.gif&quot;&gt;&lt;\/a&gt;&lt;\/caption&gt; Of course, if you don&#8217;t have images [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,18],"tags":[],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-tweaks","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/comments?post=152"}],"version-history":[{"count":2,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":1460,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts\/152\/revisions\/1460"}],"wp:attachment":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/media?parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/categories?post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/tags?post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}