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

How can i retrive that. For a few month i build a website, and i want to make it diferent

For the search i have 3 post type, and i have for each diferent themes for display - Movies - Trailers - Persons

How can

How i retrive the theme's

/* Template Name: Search Results */
$search_refer = $_GET["post_type"];
if ($search_refer == 'post') { load_template(TEMPLATEPATH . '/search/search-filme.php'); }
if ($search_refer == 'persoane') { load_template(TEMPLATEPATH . '/search/search-actori.php'); }
if ($search_refer == 'serial') { load_template(TEMPLATEPATH . '/search/search-seriale.php'); }
elseif ($search_refer == 'trailers') { load_template(TEMPLATEPATH . '/search/search-trailers.php'); };

So i want to be able to search for a movie and retrive the trailers and the movie in same page each under and search without selecting the post type. as seen on top of a picture.

The Search of movies

<?php if (have_posts()) : ?>
        $args = array(
                'post_type'=> 'post',
                's'    => $s);
<?php while (have_posts()) : the_post(); ?>


    <?php if (have_posts()) : ?>
    <?php $args = array('post_type'=> 'trailers', 's'    => $s); query_posts($args); ?>

Thanks in andvance to thouse who help me to achive this.

share|improve this question
suspiciously similar to this wordpress.stackexchange.com/questions/90752/… – Tom J Nowell Apr 23 '13 at 22:37
Not to mention this one, wherein I actually described a solution: wordpress.stackexchange.com/questions/64303/… . If your question was not answered in your previous posts and remains essentially unchanged, please go back and edit your original post rather than continuing to create new posts. – bosco Apr 23 '13 at 23:01

Your Answer


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

Browse other questions tagged or ask your own question.