Archived topic
Use relevanssi Highlight in the search result
5 replies · Started by Fulvio on January 20, 2020
Hy,
I'm using your GeneratePress theme Child 2.4.1 and the Relevanssi Plugin.
They work well together but the function to highlight the term of a search - that Relevanssi has - doesn't work.
I contacted Relevanssi support and they tell me that I have to "The theme needs to use the_excerpt() to print out the excerpts. ".
How I can do it?
Thank you
Fulvio
Hi there,
That's weird. GP definitely uses the the_excerpt() to print out excerpts:
https://github.com/tomusborne/generatepress/blob/6933da4f9a85e183bcf8485836339043dfc4a650/content-link.php#L61
https://github.com/tomusborne/generatepress/blob/6933da4f9a85e183bcf8485836339043dfc4a650/content.php#L60
Can you do a quick test and see if it works by default in a twenty series WP theme?
Let me know :)
I understand but I do not understand how to use it in a ToolSet view.
Can you help me?
thank you
fulvio
Hi there,
you would need to ask the Toolset support team for that answer.
I don't understand.
You implemented your theme providing into it relevanssi except and you can not tell me how to use it?
It's incredible
fulvio
the_excerpt() is a WordPress function.
GP uses this in its own Archive Templates.
When you create a view in Toolset Views you're replacing the content that the GP Archive Templates displays. Which means you need to include the Excerpt in the Toolset View.
And that is the reason i said you need to talk to Toolset.