Support » Plugin: Relevanssi - A Better Search » search exact phrase with relevanssi – implement [search phrase="on"]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mikko Saari


    There’s no parameter for exact phrase, it’s done with quotes on the search term.

    However, I suppose you can make a radio button which when enabled activates some code that wraps the search term in quotes.

    Hello Mikko Saari, thanks for the reply, very kind.
    How can I make that button?
    Thanks and good job

    Plugin Author Mikko Saari


    Add this to your search form:

    <input type="checkbox" name="phrase" />

    Then add this to your functions.php:

    That should do the trick. I haven’t tried the code, so it might or might not work, but that’s the general idea.

    I like this idea a lot and have just installed relevanssi, as well as implementing the checkbox for exact phrase. Unfortunately, the box does not stay checked so I am unable to contrast and compare to see whether there are different results if the box is unchecked. Any ideas?

    E Morris << purposely left unlinked in an attempt to keep spammers at bay

    duhhh… please excuse me for replying to myself. I had neglected to activate relevanssi…. The checkbox is working just fine now.

    Many thanks for a great plugin!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘search exact phrase with relevanssi – implement [search phrase="on"]’ is closed to new replies.