{"id":3910862,"date":"2013-07-08T09:06:31","date_gmt":"2013-07-08T09:06:31","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/change-tagphp-to-show-year-wise-posts\/"},"modified":"2016-08-21T02:43:46","modified_gmt":"2016-08-21T02:43:46","slug":"change-tagphp-to-show-year-wise-posts","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/change-tagphp-to-show-year-wise-posts\/","title":{"rendered":"change tag.php to show year-wise posts"},"content":{"rendered":"<p>Hi<\/p>\n<p>In the codex i found:<br \/>\n&lt;select name=&#8221;archive-dropdown&#8221; onchange=&#8221;document.location.href=this.options[this.selectedIndex].value;&#8221;&gt;<br \/>\n  &lt;option value=&#8221;&#8221;&gt;&lt;?php echo esc_attr( __( &#8216;Select Year&#8217; ) ); ?&gt;&lt;\/option&gt;<br \/>\n  &lt;?php wp_get_archives( array( &#8216;type&#8217; =&gt; &#8216;yearly&#8217;, &#8216;format&#8217; =&gt; &#8216;option&#8217;, &#8216;show_post_count&#8217; =&gt; 1 ) ); ?&gt;<br \/>\n&lt;\/select&gt;<\/p>\n<p>Which lists posts by the year.<br \/>\nWhat do i need to change in this to make it applicable only to the selected tag page?<\/p>\n","protected":false},"template":"","class_list":["post-3910862","topic","type-topic","status-closed","hentry","topic-tag-tags"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3910862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3910862\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3910862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}