Saltar navegación

[Resuelto] Can you filter by parent’s custom field in Views?

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
The user would like to filter a view by a parent post custom field.

Solution:
This is not possible yet with Toolset. We can only filter by the queried posts fields, not related posts field.

But, it is worth to mention some of our APIs that might help achieve this goal to some extent:
- https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
- https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/

This support ticket is created hace 4 años, 7 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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9: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: Africa/Casablanca (GMT+01:00)

Este tema contiene 4 respuestas, tiene 3 mensajes.

Última actualización por StanleyT8485 hace 4 años, 7 meses.

Asistido por: Jamal.

Autor
Mensajes
#1813263

Tell us what you are trying to do?
I want to filter by the parent's custom field in Views. The parent is based on Types relationship.

Is this possible?

#1813379

Nigel
Colaborador

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+01:00)

Unfortunately it isn't possible, no. Filtering by fields of related posts is on our to-do list, but I don't know when we will get to it, it is not scheduled in the next couple of dev cycles, so it is a minimum of some months away.

#1813405

I have a nested View which has custom fields from both Parent and Child posts. I was hoping to create a filter that can filter based on fields from both the Parent and Child post.

Hopefully when it is built, it can accomplish the above 🙂

#1813725

Thank you Stanley for your feedback. Toolset will always seek to get better and better.

If you are comfortable with PHP coding, it is worth to mention some of our APIs that might help you achieve your goal to some extent:
- https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
- https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/

All the best for your project.

#1814505

My issue is resolved now. Thank you!