Wordpress category specific months list in sidebar.php
What have made me pulling my hair apart for while, how to output category
specific month list. 've been searching for the same problem and solution
cannot find any lucky so far...
Anyway, I have two POST type pages in my web site.
One is NEWS page(http://mysite.com/news/) and the other is BLOG
page(http://mysite.com/blog/).
I use archive.php to show my NEWS and BLOG page.
Where I want to output month list with post countis in sidebar.php.
I could output lists by using wp_get_archives('cat=0')
however this outputs like this
2013/05(20)
2013/06(12)
2013/07(18)
2013/08(6)
HTML:
<li><a href="http://xxxxxxxx.com/wp/2013/05/"></a></li>
<li><a href="http://xxxxxxxx.com/wp/2013/06/"></a></li>
<li><a href="http://xxxxxxxx.com/wp/2013/07/"></a></li>
<li><a href="http://xxxxxxxx.com/wp/2013/08/"></a></li>
When I click one of these, this leads to the page where all the posts
happened in that specific month.
What I'd like to output if I am in NEWS page for example is:
HTML:
<li><a href="http://xxxxxxxx.com/wp/news/2013/05/"></a></li>
<li><a href="http://xxxxxxxx.com/wp/news/2013/06/"></a></li>
<li><a href="http://xxxxxxxx.com/wp/news/2013/07/"></a></li>
<li><a href="http://xxxxxxxx.com/wp/news/2013/08/"></a></li>
Category specific.
Any idea?
Thanks.
No comments:
Post a Comment