• Hi All

    Using woocommerce and creating my search results page. Ive (as Ive always done) followed WordPress Codex for the search results page.

    However Im trying to get the Woocommerce products down one column and the remaining WP content down the other.

    <?php
    global $query_string;
    
    $query_args = explode("&", $query_string);
    $search_query = array();
    
    foreach($query_args as $key => $string) {
    	$query_split = explode("=", $string);
    	$search_query[$query_split[0]] = urldecode($query_split[1]);
    } // foreach
    
    $search = new WP_Query($search_query);
    ?>
    
    <?php
    global $wp_query;
    $total_results = $wp_query->found_posts;
    ?>
    
    <div class="grid grid_pad">
    <div class="col-6-12">
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <div>
    <!-- Product content goes here -->
    </div>
    </div>

    I want to add another column (col-6-12) to show the remaining results. Can anyone help me with the rest of this.

    Thanks all.

  • The topic ‘Split search results’ is closed to new replies.