• Resolved armandl

    (@armandl)


    Is there a way to add a class to the breakdown of search hits on the search result page? I’d like to add some styling so that information doesn’t just blend into the excerpt.

    Alternatively, adding a line break before would work.

    Or, add “Search Term Hits” before? Anything to differentiate when the excerpt stops and the search term breakdown starts.

    Any ideas?

    Thanks!

    https://www.ads-software.com/plugins/relevanssi/

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

    (@msaari)

    The breakdown is passed through relevanssi_show_matches filter, you can use that to modify it.

    add_filter('relevanssi_show_matches', 'rlv_wrap_breakdown');
    function rlv_wrap_breakdown($breakdown) {
        return "<p class='breakdown'>$breakdown</p>";
    }
    Thread Starter armandl

    (@armandl)

    This is just what I was looking for, thank you SO much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Format Search Hit Breakdown’ is closed to new replies.