Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • schellbpe

    (@schellbpe)

    It doesn’t work for me either

    Tried the [raw] thing too

    Please help

    Thread Starter schellbpe

    (@schellbpe)

    Oops…this may be better

    <?php
    /*
    Template Name: Search Page
    */
    ?>
    
    <?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;
    ?>
    
    <?php get_header(); ?>
    
    <div class="row">
      <div class="span8">
    	<?php get_search_form(); ?>
    
    	<h1>Search Results</h1>
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    	<h2 class="post-title">
    	<a href="<?php the_permalink()?>" ><?php the_title(); ?></a>
    	</h2>
    <?php endwhile; else: ?>
    <div class="entry"><h2><?php _e('Sorry, no posts matched your Search criteria.'); ?></h2></div>
    <?php endif; ?>
    	There were: <strong><?php echo $total_results; ?></strong> search results.
      </div>
      <div class="span4 post-list">
    		<?php get_sidebar(); ?>
      </div>
    </div>
    
    <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)