Osclass Support Forums
Osclass theme support => Beta Osclass Theme => Topic started by: trademark on December 27, 2021, 01:19:40 PM
-
Hello,
I have created multiple custom fields for the categories in my project. I noticed that the search works only if the searched word is in the title or description of the listing. How can I make the search to work for the values of custom fields?
For example, I have a select box custom field named Brand with values Brand1, Brand2, Brand3. If I search by the word Brand2 in the search box on the homepage I want to get all the listings for which Brand2 value is selected for the field Brand.
Thank you!
-
It is required to add t_item_meta table into search and instead of sPattern use some different input name like sKeyword that will filter on all required tables.
If you check functions.php, it already extend search capabilities, you might get inspired.
-
Not sure I got it, can you be more specific, please?
-
@trademark
This can be used as reference:
https://forums.osclasspoint.com/backoffice-manager-plugin/(help)-will-this-conflict-with-'improve-search-for-premium'/msg4108/#msg4108
https://forums.osclasspoint.com/zara-osclass-responsive-theme/search-problem/msg17704/#msg17704