WordPress.org

Ready to get started?Download WordPress

Forums

Can't find the file to change the Search template when "no results" are shown (5 posts)

  1. hildergarn
    Member
    Posted 1 year ago #

    If you check this image you'll see how results display on my website, but if you leave the search box in blank and only press "Search" button, it shows this (which is what I want to change).

    I tried editing several php files with no success. If you know which file is the one to edit, let me know.

    Regards!

  2. Rafael Minuesa
    Member
    Posted 1 year ago #

    search.php

    It's the same file regardless of the search results.

    The part you need to change is between:
    <?php else : ?>
    and
    <?php endif; ?>

  3. hildergarn
    Member
    Posted 1 year ago #

    Hi Rafael. Mi template shows both lines in a different way. Let me share the whole search.php code file for you

    http://pastebin.me/3e96a03f6f856dc17c40c9dabb06ea1c

  4. Rafael Minuesa
    Member
    Posted 1 year ago #

    That's right, they are supposed to be different messages.

    Still, you just have to change those lines to whatever HTML/PHP you want, you can have the same message for both if that's what you want.

  5. hildergarn
    Member
    Posted 1 year ago #

    Really, this is not making too much sense to me. Sadly, I'm not good at PHP so I'm lost :(

Topic Closed

This topic has been closed to new replies.

About this Topic