• Resolved Rexford Haugen

    (@rexhaugen)


    On our search results page, we have custom hyperlinks to our FAQ and contact pages. With Relevanssi, we like the highlighting of search terms in the results and when following the results links, but when you click on the custom links below the results the terms are also highlighted. Is it possible to set the hrefs to not use the Relevanssi highlighting?

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

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

    (@msaari)

    Yes, you can fix that.

    The highlights are done in relevanssi_highlight_in_docs(), which is a filter on the_content hook. Unhook it and replace it with a new, more clever function.

    remove_filter('the_content', 'relevanssi_highlight_in_docs', 11);
    add_filter('the_content', 'your_relevanssi_highlight_in_docs', 11);

    Then just copy relevanssi_highlight_in_docs() as your_relevanssi_highlight_in_docs() and adjust as necessary. For example, replace the is_singular() conditional with something that checks for the pages you want to exclude.

    Thread Starter Rexford Haugen

    (@rexhaugen)

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] Disable Highlighting of specific links on results page’ is closed to new replies.