Ready to get started?Download WordPress


[resolved] Exact match on search without quotation marks (3 posts)

  1. roxer82
    Posted 1 year ago #

    I would like my page to return posts that exactly match with the words I'm looking for, but I don't want the user to introduce quotation marks nor the quotation mark displayed in the url. ┬┐Is ti possible?
    I.E.: if the url is http://www.mypage.com/?s=Hello+world I want my page to show the result as if I had searched "Hello world".

  2. roxer82
    Posted 1 year ago #

    Any suggestion?

  3. roxer82
    Posted 1 year ago #

    I added it <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; $s = get_query_var('s'); query_posts("s=\"$s\"&paged=$page"); if (have_posts()) : ?> before if (have_posts()) in search.php.

Topic Closed

This topic has been closed to new replies.

About this Topic