Skip Navigation

[Résolu] Table Views- Filter by post name with many to many rel

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

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)

Marqué : 

This topic contains 4 réponses, has 2 voix.

Last updated by Cesar Il y a 7 années et 5 mois.

Assisted by: Luo Yang.

Auteur
Publications
#451972

Hi,
I'm following this doc
https://toolset.com/documentation/user-guides/view-layouts-101/
I'm trying to simply display my CPT (Exhibition)
I have a Many to many setup were exhibition have 1 or more artists (and viceversa)

My problem is that, when creating a Table as a WP Templates archive for Exhibition I don't get the filterable header option.
And when creating a table in a View I get the header filters but i don't get relationship between my CPT.

So I need a workaround to be able to display my Exhibitions with the corresponding Artists that can be filtered by Post Name (Ascending and Descending) and also by date (Custom Term Field)
or
A workaround to be able to get [wpv-post-link id='$artistas'] outside the loop (in a regular page). This is not working when usinf it on a homepage for example
Thanks

#452208

Dear Cesar,

Views plugin is using wordpress class WP_Query to query posts, it is not possible to order the query by the parent post type information.
https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

So I suggest you try this:
1) Create a table view, query the child posts, and display the parent Artists post information
2) Setup javascripts to sort the table by Post Name and date, for example:
Tablesorter
See their document:
hidden link

#452601

The only way to filter by name Ascending and Descending is using tables??
Can I create one of those nice search templates were I can short my post by name and date using a Bootstrap Grid?

Thanks?

#452914

It is only an example, you can try with other custom JS codes, for example:
DataTables Bootstrap 3
hidden link

#453153

Ok, Thanks
I was refering to create it with native Toolset support. So I guess the answer is no.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.