• Resolved snoogly

    (@snoogly)


    First I’d like to say thanks for this plugin, as it means I can reliably use search (for “exact phrases”) as the primary means of navigation my site.

    However, I’d like to be able to remove the “……” from the search term on the search results page. Is there a way of tweaking functions.php or search.php to achieve this?

    Thanks

    http://wordpress.org/plugins/relevanssi/

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

    (@msaari)

    You need to edit your search results template to do that. Find where the search terms are printed out and remove the quotation marks there.

    Thread Starter snoogly

    (@snoogly)

    Can you give me any pointers on how to do that?

    Plugin Author Mikko Saari

    (@msaari)

    Maybe, if you show me the search results template of your theme. Put it in a pastebin somewhere and share the link, and I’ll take a look at it.

    Thread Starter snoogly

    (@snoogly)

    Great. I copied the file to my Dropbox ~ I hope that works for you:

    https://dl.dropboxusercontent.com/u/1186654/Misc/search.php

    Plugin Author Mikko Saari

    (@msaari)

    If you’re talking about the H1 header, replace this:

    <?php printf( __( ' %s', 'twentytwelve' ), '&nbsp;<span>' . get_search_query() . '</span>' ); ?>

    with this:

    <?php $search_query = get_search_query(); $search_query = str_replace('"', '', $search_query); printf( __( ' %s', 'twentytwelve' ), '&nbsp;<span>' . $search_query . '</span>' ); ?>

    That should do the trick.

    Thread Starter snoogly

    (@snoogly)

    Genius! It works a treat.

    Thank you VERY much.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove quotation marks from search term results’ is closed to new replies.