WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use Query Multiple Taxonomies with Ajax. It works with Ajax and it works without it. But unfortunately not at the same time. Basically I need an Archive page to show only the posts of my custom post type "filme" (to insert it with ajax) and another Archive page with the menue, header etc. to use it with the basic Query Multiple Taxonomies, if Javascript is disabled.

I've already tried to create a page and an empty custom post archive and "convert it" by using a function hooked to 'pre_get_posts()' but without any luck.

The problem is Query Multiple Taxonomies seems to need the main-query to work. I hope it's clear what I'm trying to do, It's a bit comprehensive.

EDIT: I've tried to load the archive-page inside itself with AJAX too, but it was incredible slow, so I guess it's not the right way to do it.

share|improve this question
up vote 0 down vote accepted

Finally I found a solution. Maybe it could help someone else.

In my archive-filme.php I just used the basic loop:

<?php if ( have_posts() ) : ?>  
    <?php while ( have_posts() ) : the_post();
         get_template_part( 'content', get_post_format() );
     endwhile; ?>
<?php else : ?>
     <?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>

Now I use a page with an custom-template. In the content-div I placed include get_bloginfo( 'url' )'/filme/?' . urldecode( $_SERVER["QUERY_STRING"] ) The query_string, cause I need to pass some GET-variables to the page.

For the ajax solution I used the checkboxes provided by Query Multiple Taxonomies and loaded the archive-filme.php into my content-div, again with the get variables. I'm really not sure if this weird text can help someone, but I hope so.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.