• I’ve noticed the support site works the same way my blogs do, when someone searches for something and no hits are found, the system spews a nasty looking error message and some brief explanatory text.

    Any way to change that, clean it up a bit? Looks like the system is crashing but in fact I think it’s operating as designed.

    TIA,

    -kj-

Viewing 1 replies (of 1 total)
  • Take a look at search.php in your template…

    You should have something like:

    <?php if (have_posts()) : ?>

    … code to display results …

    <?php else : ?>

    … code to show error …

    <?php endif; ?>

    have_posts returns true on searches if there are results. So the code in the first …’s will be the code to display the results, the code in the second …’s will be the code to display a “not found”.

    Mine does this for not found:

    <?php else : ?>

    <h5 class=”center”>No Matching Pages or Posts</h2>
    <?php include (TEMPLATEPATH . ‘/searchform.php’); ?>

    <?php endif; ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Search errors and “We couldn’t find anything” message’ is closed to new replies.