• Resolved AltMode

    (@altmode)


    Having an issue with the search results. When a search returns results there is no issue at all and the results display with all the correct pagination, but when there are no results I get a white screen. I have been trying to go through the error logs and getting no where with it as it doesn’t appear to be logging anything when I reach this white screen. I have tried disabling plugins and still get this same issue. Anyone ever encountered this before?

    It was doing it prior to updating to 4.0 just in case anyone is wondering it might be related to the 4.0 update.

    Here is the code from my search.php

    <?php get_header(); ?>
    <section class="content secondary-header">
      <div class="container">
        <div class="row">
          <div class="span12">
    	<h1>Search Results</h1>
          </div><!-- /.span12 -->
        </div><!-- /.row -->
      </div><!-- /.container -->
    </section><!-- /.content -->
    <?php if ( have_posts() ) : ?>
    <section class="content key-benefitsdesc">
      <div class="container">
        <div class="row">
          <div class="span8">
    	<p class="intro-desc"><?php printf( __( '%s', 'avac' ), '<span>' . get_search_query() . '</span>' ); ?></p>
          </div><!-- /.span7 -->
        </div><!-- /.row -->
      </div><!-- /.container -->
    </section><!-- /.content -->
    
    <section class="content">
      <div class="container">
        <div class="row">
          <div class="span8 secondary-content">
    	<?php get_template_part('loop', 'search'); ?>
    	<hr />
    
    <?php else : ?>
    <section class="content key-benefitsdesc">
      <div class="container">
        <div class="row">
          <div class="span8">
    	<p class="intro-desc"><?php printf( __( '%s', 'avac' ), '<span>' . get_search_query() . '</span>' ); ?></p>
          </div><!-- /.span7 -->
        </div><!-- /.row -->
      </div><!-- /.container -->
    </section><!-- /.content -->
    
    <section class="content">
      <div class="container">
        <div class="row">
          <div class="span8 secondary-content">
    	  <p class="lead"><?php _e( 'It seems we can’t find what you’re looking for. <br>Perhaps you should try again with a different search term.', 'avac' ); ?></p>
    <?php endif; ?>
    	  <?php search_nav( 'nav-below' ); ?>
          </div><!-- /.span8.secondary-content -->
    	<?php get_sidebar(''); ?>
        </div><!-- /.row -->
      </div><!-- /.container -->
    </section><!-- /.content -->
    <?php get_footer(); ?>

    [ No bumping please. ]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘No search results gives white screen’ is closed to new replies.