• Resolved nearlythere

    (@nearlythere)


    i’m trying to get a display of posts in future years. it does not work with nested categories. is there anyway around this?

    this is the code i am using:

    <?php $temp_query = $wp_query; ?>

    <?php query_posts('category_name=festivals&year=2006'); ?>

    <?php while (have_posts()) : the_post(); ?>
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> On: <?php the_date(); ?>
    <?php endwhile; ?>

    <?php $wp_query = $temp_query; ?>

    this is giving me a list of titles, and dates in 06, but only for a top-level category, not a sub-category.

    is this because i am working with future dates?

Viewing 1 replies (of 1 total)
  • Thread Starter nearlythere

    (@nearlythere)

    i have done more tests, and can conclude:

    i was only getting a display of future posts because i had activated the eventcalendar plugin. but it affects other categories, and if you use the code above (with top-level categories only).

Viewing 1 replies (of 1 total)
  • The topic ‘query_posts in subcategory (future years)’ is closed to new replies.