Skip Navigation

[Resolved] Archive to show only posts having parents – Types 3.0

This support ticket is created 6 years, 5 months ago. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 4 replies, has 2 voices.

Last updated by PiotrO586 6 years, 5 months ago.

Assisted by: Nigel.

Author
Posts
#912240

I have already asked this question once, but this concerned previous Types version:
https://toolset.com/forums/topic/archive-to-show-only-posts-having-parents/

With the new Toolset package, how to show only these posts in archive which have parent by using Query Filter?

#912356

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I'm checking with the developers if they see a way to do this.

It doesn't seem possible with the GUI to insert such a Query Filter, I'm checking whether it is possible with the API.

I'll get back to you.

Note that existing relationships you created before Types 3.0 will continue to work as described in the linked thread, but that won't work for new relationships.

#912416

Thanks Nigel,

I set up everything from scratch, so I don't have any existing relationships.
Ok, then I wait for your further hints.

#912426

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I just had word back from the developer that it's not possible with Types 3.0 relationships 🙁

It was something of a quirk that made it possible in the earlier versions, and the new implementation has made no provision for a "has a related post, any post" Query Filter.

It is not a use case that has come up very much before.

We don't have API filters that can modify the archive results to do this programmatically, either.

It *would* be possible if you used a View on a static page instead of an archive, and you used wpv_filter_query_post_process together with the new relationships API to modify the query results after the query has been run and strip out the non-matching results. That would involve looping over all of the results and then using toolset_get_related_post to check if there were a parent, and removing it from the list of results if not.

#912909

Thanks Nigel,

I'll try to look for some workaround.