Skip Navigation

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

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.

This topic contains 1 reply, has 1 voice.

Last updated by Gavin 1 year, 2 months ago.

Author
Posts
#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.