Highlight the search keyword

  • anant
    Participant
    # 7 months, 1 week ago

    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
    # 7 months, 1 week ago

    Hi,

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

    anant
    Participant
    # 7 months, 1 week ago

    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
    # 7 months, 1 week ago

    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
    # 7 months ago

    @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
    # 7 months ago

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

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

You must be logged in to reply to this topic.