Including search terms in results pages (4 posts)

  1. xulu
    Posted 10 years ago #

    Is there a way to include the search terms on the search results page? For instance, I'd like an empty result to display something along the lines of "No entries were found containing the word(s) XYZ." Is that possible?

  2. whooami
    Posted 10 years ago #

    sure, the search terms are put into an array named $s_array

    thats as much as info as I can share as I have to leave for work -- Im guessing someone else can elaborate on what you'll need to do with that.

  3. whooami
    Posted 10 years ago #

    ok, so here is how and its simpler than I imagined; so simple I'm surprised someone else didnt answer this for ya.

    The search terms are one variable, using any search related plugins may change that, obviously.

    So anyway, where the default message is outputted in the event nothing is found just include <?php echo $s; ?> to echo back the searched terms.

    example here:


    Ive used a highlite trick just to make it stand out more.

    neat idea, btw.

  4. xulu
    Posted 10 years ago #

    Thanks a lot! That's exactly what I was looking for.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.