Problem:
A View with text searches returns results where the search term is found only in the body and not the title, and the client wants to give higher weighting to the title.
Solution:
Views text searches builds on standard WordPress queries and so simply detects whether the string is present or not. You can specify whether to include just the post title, or both the title and the content, but not assign weights to them.
For that you would need to add a specialised search plugin.
Relevanssi (https://wordpress.org/plugins/relevanssi/) includes such weighting, and has the additional benefit that it is integrated with Views searches so that you can include text from your custom fields in the searches, too.
Relevant Documentation:
https://toolset.com/documentation/user-guides/searching-texts-custom-fields-views-relevanssi/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
This topic contains 1 reply, has 2 voices.
Last updated by 6 years, 10 months ago.
Assisted by: Nigel.