Skip Navigation

[Résolu] Display a sorted list of Parent CPTs based on the date of Child CPTs

This support ticket is created Il y a 5 mois et 1 semaine. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 1 réponse, has 1 voix.

Last updated by Gavin Il y a 5 mois et 1 semaine.

Auteur
Publications
#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.

Gavin confirmed that the issue was resolved on 2023-11-16 16:11:12.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.