views:

101

answers:

1

Hi,

I'm trying to setup a Search Results page with two columns. First column will present results from all categories except one (Galleries), and the Second column will present only the Galleries category.

query_posts() simply resets my results. This is what I got so far. Broken:

        <?php 
            $s = get_query_var('s');
            query_posts('s=' . $s . '&cat=164'); 
        ?>

        <?php 
            // First Loop 
        ?>
        <div class="contentLeft">
            <ul class="postListSmall related">
                <?php while (have_posts()) : the_post(); ?>
                    [do stuff]
                <?php endwhile; ?>

        <?php 
            // Second Loop
        ?>
            <?php query_posts('cat=-164'); ?>
            <?php rewind_posts(); ?>
                <?php while (have_posts()) : the_post(); ?>
                    [do stuff]
                <?php endwhile; ?>

    <?php else : ?>
                [do stuff]
    <?php endif; ?>

What to do?

+1  A: 

These should get you started in terms of returning search results for categories:

http://wordpress.org/support/topic/346317?replies=15

http://wordpress.org/support/topic/346060?replies=5

songdogtech