Highlight the search keyword

  • anant
    Participant
    5 years ago #11498

    Hi,

    I am currently testing WPSolr and one of our requirement is to highlight the searched keyword to be highlighted in the search result item description. Could you please confirm if this is possible?

    Also, I am looking for a way to showcase the search item when a user types the keyword in the search box.

    wpsolr
    Keymaster
    5 years ago #11499

    Hi,

    Yes, search results snippets contain highlighted keywords, with HTML tags.

    Image wpsolr-search-front-highlighting.png of

    anant
    Participant
    5 years ago #11504

    Okay, great! Thanks for the prompt response. Could you tell me what should be the settings to make this work? I do not see it working with my current settings.
    I could have attached a screenshot but I do not see any option in the editor. Please let me know if there is any ways to share that.

    wpsolr
    Keymaster
    5 years ago #11505

    There is nothing to do.

    Inspect your html code, you should see your keywords embedded in tags. Perhaps you can not see them in bold font because of your theme CSS.

    anant
    Participant
    5 years ago #11506

    @wpsolr: I checked the html code and I do not see the keyword embedded in the tags. Is there any way we can override the current theme so it can be visible? If we can change the background of the keyword(for example yellow), that will be very helpful.

    wpsolr
    Keymaster
    5 years ago #11507

    Can you send me a shared screenshot of the search html page inspection, like the one below?

    Image wpsolr-search-front-highlighting-inspection.png of

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.