Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other WordPress Search

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #39496
    aqeel
    Participant

    Hi guys i want to show the keywords on which user searched in my wordpress site like i can echo some heading on the top of results that ” Your search result for css, html etc … ” how can i do this.

    another thing is how can i make my search form to search more than one keyword. currently its showing me the results for only single keyword.

    #108400
    betzster
    Participant

    You can get the search terms with php:

    #108412
    aqeel
    Participant

    betzsrer I got it thnx …… but the other thing is how can I search on two keywords at the same time coz when I enter the keywords in search form (coma separated or without coma) the result shown are of only single keyword …. is there any way to search on more than single keyword.

    #108435

    If you are saying what I think you are, you should try this out:

    "' . get_search_query() . '"' ); ?>

    This will add quotes before and after the term, but obviously if you want to get rid of those, or switch the span to something else, you are free to do so.

    Edit: An easier way of doing the same thing is echoing

    get_search_query()
    #108467
    aqeel
    Participant

    thnx buddy

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Other’ is closed to new topics and replies.