Support » Fixing WordPress » "Search page" shows blank page if result is not accurate

  • Hi. I’m testing a blog i’m creating and at the moment the search form works ok, but when I search for rubbish words it shows a blank page. Is it possible to tell the search form to display the 404 page?

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    (@esmi)

    Forum Moderator

    It would be easier to just add an else conditional to the end of the Loop in search.php along the lines of:

    <?php else : ?>
    <span class="sorry"><?php _e('Sorry - I couldn\'t find anything' ));?></span>');?></p>
    <?php endif; ?>

    Hi esmi. I tried and the code disabled my search page. Let me show you the code of my search.php page

    [ Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin ]

    If it helps on something I’m using this template. Thanks!

    Let me show you the code again using pastebin: http://pastebin.com/mBbpz0JT

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘"Search page" shows blank page if result is not accurate’ is closed to new replies.