WordPress.org

Ready to get started?Download WordPress

Forums

query_posts in child category (1 post)

  1. MacDoodle
    Member
    Posted 6 years ago #

    As short as possible... been working on this all day.

    The situation is that I cannot find an effective way to sort posts based on a custom field meta info of a future date (YYYY-MM-DD). I thought there might be a way to "future date" posts and still have them displayed on the site - there is.

    Unfortunately, what I'm running into is that while all of the posts display on the parent category list (archive.php), they will not display when you go to the child category list.

    How I'm getting there, (code found on other posts):

    <?php get_header(); ?>
    
    <?php query_posts('post_status=future,publish&orderby=date'); ?>
    
    <?php if (have_posts()) : ?>
    
    blah blah blah
    
    <?php while (have_posts()) : the_post(); ?>
    
    post blah blah
    
    <?php endif; ?>
    
    <?php endwhile; ?>
    
    next / previous
    
    <?php else : ?>
    
    Not Found
    
    <?php endif; ?>

    Is there something I'm missing that would make this work on the child pages, short of tearing it all apart and starting over?

Topic Closed

This topic has been closed to new replies.

About this Topic