Support » Fixing WordPress » Exact match on search without quotation marks

  • Resolved roxer82

    (@roxer82)


    Hello,
    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”.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Any suggestion?

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exact match on search without quotation marks’ is closed to new replies.