WordPress.org

Support

Support » Themes and Templates » Custom post type yearly archive

Custom post type yearly archive

  • beetrootman

    @beetrootman

    Hi,

    I’ve set up some custom post types. I cannot work out how to get yearly archives working with them. I have added a function to my functions.php that allows me to use ‘post_type’ in the wp_get_archives function to generate a list of years like this:

    <?php wp_get_archives(‘type=yearly&post_type=post_type_name’); ?>

    However when I click any of the years I got nothing. I presume I need to do something else? Any ideas, I really yearly archives of my custom posts.

    Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom post type yearly archive’ is closed to new replies.