[Plugin: Relevanssi – A Better Search] Using posts_search filter in RelevanSSI (or equivalent)
-
Hi Mikko,
Awesome plugin! I have run into a bit of a snag – you mention that RelevanSSI replaces the default WordPress Search, does it also override theposts_search
filter? I wrote https://pastebin.com/XnvbfpfS which basically takes the search term, finds if it has ‘TL’ in the term and then returns (in addition) ‘TL-‘ as a search term pre/appended onto whatever else is attached to it). After enabling RelevanSSI, the filter does not work anymore. Is relevanssi_do_query() what I’m looking for here? Do you have a quick example of how I could plug into this area? Thanks!This is being used to search for post titles –> as most people type in TL123 instead of TL-123 (the filter I wrote attempts to fix that)
I tried to use the “synonym” area, but I believe it’s looking for whole terms and not “parts of terms”. Is there any regex available in that area as well?
- The topic ‘[Plugin: Relevanssi – A Better Search] Using posts_search filter in RelevanSSI (or equivalent)’ is closed to new replies.