WordPress Custom Content and Taxonomy’s Archives

Firstly, the ‘future’ status is for posts that are not yet published and should not be used to mark events that occur in the future.

(I would recommend storing the event’s data in the post meta, and then query/order by that post meta field. See this question and this question)

Secondly, in your code you have these two lines:

$args = array( 'post_type' => 'event', 'posts_per_page' => 50, 'post_status' => 'future', 'order' => 'ASC' );
$loop = new WP_Query( $args );

These completely override the default WordPress query which attempts to find ‘published’ events from your database that match the taxonomy term. (keep in mind ‘future’ events/posts are not considered ‘published’.)

Your $loop query attempts to query the database for any ‘event’ that is not yet published, and since this over-rides the original query, it should show the same for every taxonomy term.

But you don’t see this… (sometimes you see that there are no events). This is because of the conditional:

have_posts();

This is checking if the orginal query had any posts (i.e. are there any published events in this taxonomy term). It is not checking your current query (are there any future events?). To check your $loop query:

$loop->have_posts();

How to merge rather than replace the query

So, above I’ve said that you are over-riding the query that WordPress automatically does (looks for published events for that term). To include the taxonomy-term request in your new query, use the following trick:

Replace the two lines of your query with:

$args = array( 'post_type' => 'event', 'posts_per_page' => 50, 'post_status' => 'future', 'order' => 'ASC' );
//Merge with default query
global $wp_query;
$args = array_merge( $wp_query->query,$args);
$loop = new WP_Query( $args );