Skip Navigation

[Resolved] Create a single table view with data from multiple post types

This thread is resolved. Here is a description of the problem and solution.

Problem:

I want to create a table structure with sort able column heads to contain data from five different post types .

Solution:

Toolset Blocks plugin is using WordPress class WP_Query to query post data, according to WP document:

https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters

In order to sort the results, all custom fields should be in same post type.

So there isn't such kind of built-in feature within Toolset

Relevant Documentation:

This support ticket is created 3 years, 3 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 3 voices.

Last updated by martink-8 3 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#2130719
Screenshot from 2021-08-01 15-39-17.png

Tell us what you are trying to do?
I want to create a table structure with sort able column heads to contain data from five different post types .The have 5 posts types have the following post relationships
1. Province post type
2. District post type(many districts can be linked to one Province)
3. Sector post type(many Sectors can be linked to one District)
4. Cell post type(many Cells can be linked to one Sector)
5. Village post type(many Villages can be linked to one Cell)

So basically I am trying to combine data from many post types in one table view.
Please see the image below to that you get what I am Trying to do.

#2131325

Hi,

Thank you for contacting us and I'd be happy to assist.

For what you're trying to achieve, you'll need some custom code workaround.

Can you please share temporary admin login details, along with the link to a page where you'd like to show this table?

I'll be in a better position to perform some tests on my website and guide you with the next steps accordingly.

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#2134483

Hello,

Toolset Blocks plugin is using WordPress class WP_Query to query post data, according to WP document:
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
In order to sort the results, all custom fields should be in same post type.

But in your case, it is 5 different post types, so there isn't such kind of built-in feature within Toolset plugins, you can submit a feature request for it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
Our developers will evaluate it.

#2134537

My issue is resolved now. Thank you!