Successful search return forwards page after results displayed?
-
Like the title says..I am using the “Mystique” 2.4.2 theme and when I put in my search query I have issues. If the string is not found found the error page is displayed correctly. “Nothing found. Try a different search?” However, if results are returned it quickly flashes the result page across the screen and then almost instantly goes to a blank white page and stays.
The problem happens in multiple browsers in both Linux and Windows. Firefox shows “Stopped” in the bottom left corner. I have looked at the coding and see nothing wrong, but I have limited experience. I have also tried disabling all plugins and widgets I can. The problem persists.
searchform.php
<?php /* Mystique/digitalnature */ ?> <?php $searchquery = wp_specialchars(get_search_query(),1); if (!is_search() || (is_search() && have_posts() && ($searchquery && $searchquery!=__("Search","mystique")))): mystique_search_form(); else: ?> <p class="aligncenter"> <?php if(($searchquery) && ($searchquery!=__('Search',"mystique"))): printf(__("You have searched the archives for %s","mystique"), '<span class="altText"><strong>'.wp_specialchars(get_search_query(),1).'</strong></span>'); else: _e("Type a valid search term...","mystique"); endif; ?> </p> <?php endif; ?>
search.php
<?php /* Mystique/digitalnature */ get_header(); ?> <div id="main"> <div id="main-inside" class="clear-block"> <!-- primary content --> <div id="primary-content"> <div class="blocks"> <?php do_action('mystique_before_primary'); ?> <?php $searchquery = wp_specialchars(get_search_query(),1); if(($searchquery) && ($searchquery!=__('Search',"mystique"))): if (have_posts()): ?> <h1 class="title"><?php printf(__("Search results for %s","mystique"),'<span class="altText">'.$searchquery.'</span>'); ?></h1> <?php mystique_pagenavi(); while (have_posts()): the_post(); mystique_post(); endwhile; ?> <!-- page navigation --> <div class="page-navigation clear-block"> <?php mystique_pagenavi('alignright'); ?> </div> <!-- /page navigation --> <?php else: ?> <h1 class="title"><span class="error"><?php _e('Nothing found.','mystique'); ?></span> <?php _e('Try a different search?','mystique'); ?></h1> <?php mystique_search_form(); ?> <?php endif; ?> <?php else: ?> <h1 class="title"><?php _e('What do you wish to search for?','mystique'); ?></h1> <?php mystique_search_form(); ?> <?php endif; ?> <?php do_action('mystique_after_primary'); ?> </div> </div> <!-- /primary content --> <?php get_sidebar(); ?> </div> </div> <!-- /main content --> <?php get_footer(); ?>
- The topic ‘Successful search return forwards page after results displayed?’ is closed to new replies.