Saltar navegación

[Esperando confirmación del usuario] How can I perform a full text search of custom post fields

This support ticket is created hace 1 semana. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Este tema contiene 2 respuestas, tiene 1 mensaje.

Última actualización por Minesh hace 1 día, 17 horas.

Asistido por: Minesh.

Autor
Mensajes
#2799573

I would like to do a full text search of a custom post field. For example I have a collection of custom posts called Plants which contain a field called English Name. One of the names is "Crown Daisy", if I search for "daisy" I want the plant containing the English name "Crown Daisy" to be returned. What would be the best way to implement this functionality?
Thanks for any help

#2799589

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Toolset offers text search integration with Relevanssi using which you can search in custom field.

Please check the following Doc and see if you able to get the desired results.
=> https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/

#2799773
eng-name-snippet.JPG
plant-eng-name.JPG

Hi Minesh, Tried following the doc.
English Name is a field in the Plant custom post (see image), it's also registered as a Taxonomy,
and in an HTML snippet (see image) used here:

[code]
<label for="wpv-english-name">English Name</label>
<select id="eng-name" class="chosen-select" required onchange="window.location.href=this.value" name="wpv-english-name">
<option value="" disabled selected hidden>Click, start typing name, or scroll to select plant</option><br/>
[xyz-ihs snippet="select-options-english-name"]
</select>
[/code]

is any of this searchable with Relevanssi or do I need to create a custom field? If so
how do I do that
Thanks for your help

#2799864

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

As you can see with the Doc:
=> https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/#which-custom-fields-can-i-add-to-relevanssis-index-with-toolset

You can use Single line, Multiple line or WYSIWYG with Relevanssi integration. You have custom third-party field and I'm not sure if it will work or not.

Can you please share problem URL where you added the text search as well as admin access details and also tell me what view you created.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.

#2799878

I don't have a view, but the Home Page content template contains a drop down list of English Names. I would like a full text search of English Names, and when a name is found, clicking it will go to the Plant post same as clicking English name on Home page.
Thanks

#2800170

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

I do not see you are using views here and without using view custom search is not possible.

Here is the Doc about how you can implement basic text search:
- https://toolset.com/documentation/legacy-features/views-plugin/filtering-views-for-a-specific-text-string-search/

And using Relevanssi:
- https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/#which-custom-fields-can-i-add-to-relevanssis-index-with-toolset

You should try to setup a view and text search and see if that helps as per your requirement.

#2800192

Thanks Minesh,
Will let you know if I'm successful, or have any problems.

#2800223

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

ok fine.