General Category & Searches lead to blank page
-
I’ve been hunting all over for a case similar to mine and have had no luck. So if this is a problem that has been solved in some other post, I apologize.
Site with problem:
https://www.golocalchico.com/Problem:
Some things entered into the search field return results appropriately. For instance, if you search for “dragon” you will get results displayed as wanted. If you search for something such as “local”, then you will see an almost entirely blank page… the only thing visible is the background image, not even the sidebar displays. The problem is also existent when you click on the “general” category, but it doesn’t arise with any of the other categories.My suspicion as to the problem:
I have made a “search.php” page and checked my loops to the best of my knowledge, albeit my knowledge of wordpress isn’t what one would call “expert”. I have tried increasing the limit of how many posts can be displayed per page, because I’m pretty sure that the problem is tied somehow to there being too many results to display… but even if I push the limit to 50 posts per blog page (which should be plenty) it continues to give me a blank results.I’m desperate for help and would greatly appreciate any that anyone can provide.
The source code for my “search.php” template file
Hopefully this code can reveal where I’ve made my mistake, as I’ve discovered that when I switch the template over to the WordPress Classic, the search works appropriately.‘<?php get_header(); ?>
<?php get_sidebar(); ?><div id=”container”>
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<div class=”post”>
<h2>” title=”<?php the_title(); ?>”><?php the_title(); ?></h2>
<div class=”entry”>
<?php the_content(); ?>
<p class=”postmetadata”>
<?php _e(‘Filed under:’); ?> <?php the_category(‘, ‘) ?> <?php _e(‘by’); ?> <?php the_author(); ?> |
<?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?> <?php edit_post_link(‘Edit’, ‘ | ‘, ”); ?>
</p>
</div>
</div><?php endwhile; ?>
<div class=”navigation”>
<?php posts_nav_link(); ?>
</div>
<?php else : ?>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<h3><?php _e(‘Sorry, your search returned no results. Please try searching again, or browse using the navigation above and to the left.’); ?></h3>
</div>
<?php endif; ?></div> <!– END OF CONTAINER DIV –>
<?php get_footer(); ?>
</div> <!– END OF WRAPPER –>
</body>’
Thank you in advance, for any help you may be able to provide.
- The topic ‘General Category & Searches lead to blank page’ is closed to new replies.