• Resolved curtismchale

    (@curtismchale)


    I’m building a site for a music venue. Currently we’re setting the show publish date to the future and using that to display the date. I’ve set the query to display future.

    The issue comes when we want to view taxonomies on those future posts as well. I figure I have to hook into the query just before it runs and pass the extra future variable but I’m having a hard time finding the right hook to use and getting the code to run work.

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

    (@curtismchale)

    Yeah of course I found a workable solution just after I posted. Code below

    <?php
    
                    // modifying the query for show taxonomies to show future objects
                    $customTax = array('genre', 'goes_with', 'seating_plan');
    
                    if(is_tax($customTax)){
                        global $query_string;
                        query_posts($query_string . '&post_status=future,publish');
                    }
    
                ?>

    placed on archive.php

Viewing 1 replies (of 1 total)

The topic ‘Modifying the query just before it runs’ is closed to new replies.