Saltar navegación

[Resuelto] Custom Ordering Relationship Posts in View

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

Problem:

The issue here is that the user wanted to sort a view displaying child posts based on the parent custom field.

Solution:

This can only be done with a nested view setup where you have to perform the sorting from the parent view.

100% of people find this useful.

This support ticket is created hace 6 años, 1 mes. 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)

Este tema contiene 20 respuestas, tiene 2 mensajes.

Última actualización por Gavin hace 6 años, 1 mes.

Asistido por: Shane.

Autor
Mensajes
#1176167

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Gavin,

So your child view will be sounds then.

So What you need to do then is to have the child view being Sounds and then add the Sounds view to the Intermediary view.

Then add that intermediary view to the Sequence template.

Please let me know if this is clear. Also on your intermediary view I see that you selected the Sounds cpt as well. The only CPT that should be selected is the Intermediary one.

Thanks,
Shane

#1176171

Yep - the Sound selection was my bad....

So I have done this (as per screenshots) and it's not working.

The intermediary view is on the sequence template.

The child (sounds) view is nested.

The intermediary view is not finding any items.

#1176175

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Gavin,

Would you mind providing me with access to the site as well as a link to the page where I can see this ?

I want to ensure that everything is setup correctly.

Thanks,
Shane

#1176214

It seems to work if I set both views to:

Select posts in a Sounds to Sequences relationship that are related to the Post where this View is shown.

#1176221

Hi Shane...

I think I've got it.

The problem seems to be that if I change filter settings I need to re-link the SOUNDS to SEQUENCES then it works?

I have set the parent to:

Select posts in a Sounds to Sequences relationship that are related to the Post where this View is shown.

And the child to:

Select posts in Any relationship that are a related to the current post in the loop.

I will continue to test to see if this is resolved.

#1176229

My issue is resolved now. Thank you!