Is it possible that some Relevanssi settings are not applied when using Toolset View's search?
We created a search that seems to work fine, but the Extract and highlight settings of Relevanssi, where we can highlight the searched words in the results doesn't work.
I do see in the url that the wpv_post_search string with the searched words is there and is carried to the next page if we click on a result, which I assumed is needed for that functionnality... But no words is highlighted either in the result or the opened page after a click on the result.
I see in the Relevanssi settings that for the title, "the_title()" must be replaced by "relevanssi_the_title()"... Does Views do it automatically, or we need to do it manually? Where do we do that?
Also, for the document, we must "add an additional parameter highlight to the outcoming links" and that "Relevanssi should add it automatically"... Is there something there that we need to do?
Thank you.
P.S. You can see an example of the search form in that page: hidden link
Hello. Thank you for contacting the Toolset support.
Can you please share few keywords that I should use to make a search and that should be highlighted within the title - correct?
If yes:
Please share access details as well so that I can look at it.
*** 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.
There are two different things:
1) hidden link
Returns the title for post $post_id. Use this function to show highlighted titles ($post->highlighted_title). If there’s no highlighting in the title, the basic title is displayed.
And
2) hidden link
This function will take a string and a search query, and returns the string with all the words of the search query highlighted. The search query will be tokenized, so stopwords and small words are not highlighted. The highlighting method is the one you’ve specified in the Relevanssi settings.
Which method you want to apply. As for now, it seems you want to highlight the search keyword in the title displayed as results - correct?
in addition to that, it seems that the user you shared seems no right to edit the "Custom Code" section of Toolset. If I try to edit, it shows the error.
Can you please send me FTP access details so that I can access the source file and add the require code.
I have set the next reply to private which means only you and I have access to it.
This is strange, since I'm an admin... And I DO have access to the Custom Code section of Toolset (I even created some functions there)...
I saw the Relevanssi documentation you refer to, I just don't know where to change it... I guess in functions.php...
I've changed the settings to enable permalinks, so the new url of the page is hidden link
I've also switched my account to English if it can help you.
Unfortunately, I'm not the owner, so I can't give you FTP access, but I have WP File Manager installed (that you can see in the left menu), so you should be able to do what you want/need with it.
To answer your question, I want the term hightlighted in the title, but also in the extract and if possible page that is displayed after we click a result (the wpv_post_search url parameter that is transfered to the page should allow that...).