Skip Navigation

[Resuelto] Filter search custom field

This support ticket is created hace 9 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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 21 respuestas, tiene 2 mensajes.

Última actualización por Minesh hace 8 meses, 4 semanas.

Asistido por: Minesh.

Autor
Mensajes
#2685610
Captura de pantalla 2024-02-28 143707.png

Hi, I have a view that shows a list of a specific repeating field. it also has a search engine.
It shows the list but I can't get it to filter by the search field.

I am attaching a screenshot of what I have done so you can analyze it a little better.
https://toolset.com/documentation/legacy-features/views-plugin/passing-arguments-to-views/
what am I not doing right?

Thanks for your help.

#2685690

Minesh
Supporter

Idiomas: Inglés (English )

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

Hello. Thank you for contacting the Toolset support.

I see you are using legacy views.

As I understand - do you want to offer a frontend filter for your custom field rating so that user can filter the view result when they select any rating filter option? Is that correct or you want to filter with rating field with some specific value?

If you can describe your requirement in brief I will be able to guide you in the right direction.

In addition to that - Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/

#2685709
Captura de pantalla 2024-02-29 090938.png
Captura de pantalla 2024-02-29 090957.png

Hello,
The repeated field has two fields:
-File title
-File

It will list all the repeated fields of all the posts in a CPT.

I have created a search filter to filter by the file title field. This filter does not work, when you search it tells you that no result was found even though it exists in the list.

#2685755

Minesh
Supporter

Idiomas: Inglés (English )

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

Based on the screenshot I only get half of the information about your structure.

Can you please share admin access details and the problem URL where you added your view and tell me with what field you want to search and what is your expected results. Once I review your current setup I will be able to guide you in the right direction.

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

#2685771

Minesh
Supporter

Idiomas: Inglés (English )

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

I see and review your structure and if I am not wrong the field you want to search using text search filter is the field "nome-del-file".

If this is correct :
- To search in the text you will require to use the relevanssi plugin which Toolset is integrated to search in the custom field.

As you want to search in the repeating field group field, you have to index repeating field group and add the custom field name as shown with the following Doc.

You should try to follow the following Doc :
- https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/

Can you please try to do that and see how it goes.

#2685917

Hi, I'm checking the manual and the Relevanssi plugin is a paid one, isn't there any free option to do it, or to approach it in another way?

#2685922

Minesh
Supporter

Idiomas: Inglés (English )

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

I've added the relevanssi plugin on your install:
- https://wordpress.org/plugins/relevanssi/

Then with relevanssi settings I've checkmark the checkbox "scarica-i-file" under section "Tipi di articoli" and also added the custom field name "wpcf-nome-del-file" under section "Campi personalizzati".

With your view I've edit the query filter for your text search, I've set the option to search in: Title, body and custom fields
- enlace oculto
=> as you can see with the following screenshot: enlace oculto

I can see there is a repeating field group first item setup with custom field "Nome del file tecnico" and the value assigned to it is "Prueba tecnico" for the repeating field group "Scarica i file" with the following post.
- enlace oculto

Can you please check now: enlace oculto

I've search with the text "Prueba" and I can see the above view display one result.

#2685933

Hi, I'm trying the one you send me and it works but on the other page I told you about it doesn't work and apparently I see that it has the same configuration.

#2685934

Hi, I'm trying the one you send me and it works but on the other page I told you about it doesn't work and apparently I see that it has the same configuration. Scheda tecnica di sicurezza

#2685935

Minesh
Supporter

Idiomas: Inglés (English )

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

As you can see with the Relevanssi settings page:
- enlace oculto

I've set same configuration - selected the checkbox "schede-di-sicurezza" and also added the repeating field custom field "wpcf-nome-del-file-sicurezza" to the section "Campi personalizzati".

With your vie - I've edit the query filter for your text search, I've set the option to search in: Title, body and custom fields
- enlace oculto
=> as you can see with the following screenshot: enlace oculto

I search with the word "Prueba" and I can see it filtering the results.
- enlace oculto

#2685939

Hi, the screenshot you send me where you select body title and custom fields I can't see it or display those options in your screenshot from any of the two views, can you tell me exactly where I can find those settings?

#2685941

Minesh
Supporter

Idiomas: Inglés (English )

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

With your view:
=> enlace oculto

Navigate to "Search and Pagination" section and remove the text filter you added and save your view and reload the page:

<div class="filters">
  <label for="wpv-post-search">[wpml-string context="wpv-views"]Ricerca[/wpml-string]</label>
  <div class="form-group search">
      [wpv-filter-search-box output="bootstrap"]
      [wpv-filter-submit name="Presentare" output="bootstrap" class="btn-secondary btn-search"]
  </div> 
</div>

Then navigate to "Query Filter" section and you will see a "Edit" button to edit the filter and you will see the settings.

Once you done with that again navigate to "Search and Pagination" section and add the above content that you removed and save your view.

#2685946

Ok, after your last changes I was able to add the filter again and it works.
Thank you.

#2685947

Minesh
Supporter

Idiomas: Inglés (English )

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

Glad to help you out. You're welcome to mark resolve this ticket. Have a great time ahead.

#2685948

I don't know what's happening but it's not working again and I haven't modified anything.