• Resolved Mark Howells-Mead

    (@markhowellsmead)


    When searching for a term, the term is highlighted in the results by an EM tag. (I’ve simplified this using highlightPreTag and highlightPostTag in the algolia_search_params filter.) However, the EM tag is added within HTML attributes (e.g. the IMG and A tags), which breaks the page’s HTML.

    Can this be fixed, or is there a way to completely remove the highlighting altogether? I’ve found attributesToHighlight but it’s unclear how to modify this using WordPress filters in the PHP code.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Unsure if you’ve already fixed the issue via the UI settings for Algolia Dashboard, as I’m not seeing the issue thus far.

    Regarding any sort of code/php/filter based management for the settings, you’d want to check out https://github.com/WebDevStudios/wp-search-with-algolia/wiki/Index-Settings. There’s some filter examples towards the end for how to customize some of them. The settings should pretty well match up with the details you’d see in the Dashboard.

    Thread Starter Mark Howells-Mead

    (@markhowellsmead)

    The problem was still evident as one of the image HTML tags was broken. Using the filter algolia_search_highlighting_enabled did the trick. I haven’t been able to find these settings in the Algolia dashboard. Thanks for the suggestion.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.