Forums

Relevanssi - A Better Search
[resolved] Relevanssi keywords highlighted in navigation and breadcrumbs (10 posts)

  1. Boris
    Member
    Posted 1 year ago #

    When I have the 'highlight query terms in documents' option selected in Relevanssi, and I click on one of the posts/pages in the search results, the keywords that are in the navigation menu and in the breadcrumbs path, are also highlighted. Worse, the menu item titles are broken in two lines because of the span that is added.
    I'm working with a theme based on the older wp-multiflex-3 theme.

    Does anyone know how I can keep those highlights from appearing? The function of highlighted search terms in the document is important to me. I noticed this used to be an issue in Relevanssie, but was solved in version 2.2...I'm afraid I don't have a URL, it's only on the test website so far.

    Other than that, it's a wonderful plugin!

  2. msaari
    Member
    Posted 1 year ago #

    It's because the highlight attaches to the_title hook, which is triggered in breadcrumbs. I suppose it can be fixed somehow, but I don't have a solution ready.

  3. Boris
    Member
    Posted 1 year ago #

    Hi msaari, thanks for the quick reply! Actually, the breadcrumbs I can live with. It's the part in the navigation menu that's really bothersome. But that must be the same issue I assume?

  4. Boris
    Member
    Posted 1 year ago #

    What doesn't make sense to me though, is that the problem occurs only when the 'highlight query terms in documents' is active, not 'highlight query terms in titles". I.e., it's not calling the_title then, is it?

  5. msaari
    Member
    Posted 1 year ago #

    Actually, the highlight in titles option only affects the search results page. There's some faulty logic in the settings, then. I'll have to fix this so the title setting affects the document pages as well.

    Yes, the navigation menu is caused by the same the_title filter.

  6. Boris
    Member
    Posted 1 year ago #

    Allright. I'll keep my eye out for an updated version then, thanks for your help!

  7. Boris
    Member
    Posted 1 year ago #

    Shall I leave this one open so you can post the update here once it's done?

  8. msaari
    Member
    Posted 1 year ago #

    I'll try to remember to update here.

  9. msaari
    Member
    Posted 1 year ago #

    Fixed in 2.8.

  10. Boris
    Member
    Posted 1 year ago #

    Wow, that's fast! Thanks for posting the update!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic