ThemeShaper Forums » Thematic


thematic_archives by year?

(3 posts)
  • Started 9 years ago by themonkey28
  • Latest reply from themonkey28
  • This topic is not resolved


  1. themonkey28

    How do i list my archives by year?
    sorry for the newbie question but i saw that there is a thematic_monthly_archives but i dont know how to make it into yearly? any advice?:)

    thanx so much!

    Posted 9 years ago #
  2. middlesister

    Well if you want to duplicate thematic's function but change it to yearly archives you put this code in your child theme's functions.php.

    function childtheme_yearly_archives() { ?>
    			<li id="yearly-archives" class="content-column">
    				<h2><?php _e('Archives by Year', 'thematic') ?></h2>
    					<?php wp_get_archives('type=yearly&show_post_count=1') ?>
    <?php }
    add_action('thematic_archives', 'childtheme_yearly_archives', 6);

    If you just want to display the archives somewhere, then the wp_get_archives() line in the middle would be enough.

    Posted 9 years ago #
  3. themonkey28

    thanx for that! it works.. but how do i filter it by year in a certain category? like only under the news category will be listed by year?

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.