Skip Navigation

[Resolved] Custom field of Woocommerce product not found in search

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user has a views parametric search with a search box, however the search box is not searching through custom fields.

Solution:

It is quite possible that you only told your search to Search through the post Title and content.

However on the filter query for your search box you should set it to the option "Title, Body and Custom fields"

This way your search will look at the custom fields as well

This support ticket is created 4 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by katjaL 4 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#1331583

I have set up Relevanssi plugin to search custom fields, but for some reason I can't make it work, the text field is not included in search. The search form is a toolset search form.

I have activated the "Include this field in text searches throughout the site".
I have copied the list of field names in Toolset Settings/Text Search.
I have saved the options and build the index in Relevanssi Search Options/Indexing.

#1331607

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Katja,

Thank you for getting in touch.

Were the products post type select in Views as one of the post types to display on the view ?

Could you send me a screenshot of the view section on the backend so that I can have a look ?

Thanks,
Shane

#1331977
Screenshot 2019-09-05 at 6.53.56.png
Screenshot 2019-09-05 at 6.53.17.png

Hi Shane, yes products are there. Here you go.

#1332637

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Katja,

Would you mind allowing me to have admin access to the site ?

As well as which custom fields are not showing up from the search ?

If these are supported by Relevanssi then we may be able to get them to work, even if they are not Types custom fields. However I would need to check which fields these are to give an accurate response.

Thanks,
Shane

#1332749

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Katja,

I was able to log in and check on the post.

However i'm not seeing where you mentioned where the search form is or which view is controlling the search.

Could you send me a link to the page where the search is or the edit page for the view on the backend ?

Thanks,
Shane

#1333077

Thanks Shane. The search box is inserted into the footer (footer area 4) of the site with shortcode [wpv-form-view name="haku" target_id="56870"] and the search view is called "Haku".

#1334781

I have this same problem (text search not working) with "normal" Toolset custom text fields also. So it's not related to WooCommerce. I can't make the text search work (Relevanssi) with your tutorial. So either I'm missing something or something has changed.

#1335859

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2019-09-09 at 1.48.58 PM.png

Hi Katja,

I see the issue now.

You only told your search to Search through the post Title and content. See Screenshot

I've updated this so that it searches through the custom field as well.

It should now be working.

Thanks,
Shane

#1335871

OMG I totally missed that setting. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.