Hello,
Tell us what you are trying to do?
I am trying to use Relevanssi to search my Toolset custom search for text posts.
I would like to implement highlighting for the search terms in Toolset customs posts (using Relevanssi).
I contacted Relevanssi who asked the following question:
"Is Toolset using Relevanssi-generated excerpts? If it is, the highlighting should happen automatically, but if it's not, then I don't know what it is doing and can't really help you out there."
Is there any documentation that you are following?
I have checked existing forum support and documentation, but cannot find the answer.
Any information or advice would be very welcome.
Best regards,
BillD

Minesh
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
Can you please check the following reference ticket and check if that helps you to resolve your issue.
https://toolset.com/forums/topic/custom-search-relevanssi/#post-492275
Hello.
Thank you for your reply.
I'll try this, but need help with the 2nd part.
I have added the PHP code to the function file (and corrected the spelling of highlight).
Please can you tell me where to put the shortcode, below, as I cannot see where it should go?
I used Custom Search Filter in blocks to create the search bar.
Thanks,
BillD
https://toolset.com/forums/topic/custom-search-relevanssi/#post-492275
[hightlight-keyword][wpv-post-excerpt][/hightlight-keyword]
It will be able to search in the text of [wpv-post-excerpt], find and hightlight the keyword

Minesh
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
Asia/Kolkata (GMT+05:30)
The shortcode you shared - you should add within the View's loop.
[hightlight-keyword][wpv-post-excerpt][/hightlight-keyword]
Thank you for your reply. I've tried, but not succeeded.
Can you please be more explicit?

Minesh
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
Asia/Kolkata (GMT+05:30)
Can you please share problem URL and admin access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.

Minesh
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
Asia/Kolkata (GMT+05:30)
When I try to access the wp-admin it shows the following message:
<codE>
Your access to this site has been limited by the site owner
[/php]
Can you please grant full access.
I think it was Wordfence.
Should be ok now.
Let me know if it is not.

Minesh
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
Asia/Kolkata (GMT+05:30)
Can you please share bit more details with what keyword I should try to search and what you expect?
Yes of course.
Please try a search with the term "contract" in "recherche"
I would like to see the term "contract" highlighted using a yellow background where ever it appears in the results.
You can see the option in Settings / Relevanssi / excerpts and highlights.
This is what I am trying to achieve a search using Relevanssi which highlights the terms searched using the toolset custom search box.

Minesh
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
Asia/Kolkata (GMT+05:30)
When I try to search with the term "contract" and click on button ""Rechercher" it shows me the following message.
- Sorry, you are not allowed to preview drafts.
When I try to search with the term "contract" and click on button ""Rechercher" it shows me the following message.
- Sorry, you are not allowed to preview drafts.
IT SHOULD be ok now. Just need to edit page and update.
Sorry about that.

Minesh
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
Asia/Kolkata (GMT+05:30)
Its still not working - I get the same error message still.
Ok. I have checked again and there are no more restrictions on the page.
I can access it from a different browser and login. You should be able to too.

Minesh
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
Asia/Kolkata (GMT+05:30)
I've called the shortcode as given under:
[highlight-keyword][types field='anglais'][/types][/highlight-keyword]
Now, when I search for the keyword "contract" I can see it in yellow color:
=> link replaced