Saltar navegación

[Resuelto] Display a sorted list of Parent CPTs based on the date of Child CPTs

This support ticket is created hace 1 año, 2 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.

Este tema contiene 1 respuesta, tiene 1 mensaje.

Última actualización por Gavin hace 1 año, 2 meses.

Autor
Mensajes
#2665431

Hello

I have a CPT called Chat
I have a CPT called Reply

They are in a one-to-many relationship. i.e. One Chat can have many Replies.

I can display the Chats for the most recent Replies using nested views. However, if a Chat has more than one recent Reply then the Chat will display twice. I would like it to only display once.

I would like to display a sorted list of Chats based on the date of Replies - like a forum with the most recently replied to post at the top.

I am using Views in expert (old) mode and not blocks.

Just a rough outline of the approach is all I need.

Many Thanks

Gavin

#2665501

I have figured out a way of doing this by having a view within a view within a view and passing the post-ID down the chain and comparing.

I will update if I get it working.

#2665529

It's possibly a clunky solution but it works.