Hey there, Awesome Customers!

Just a heads up: We'll be taking a breather to celebrate International Workers' Day (May 1st and 2nd - Wednesday and Thursday) and Orthodox Easter from Good Friday (May 3rd) through Easter Monday (May 6th). So, from May 1st to May 6th, our team will be off enjoying some well-deserved downtime.

During this time, our customer support will be running on a smaller crew, but don't worry! We'll still be around to help with any urgent matters, though it might take us a bit longer than usual to get back to you.

We'll be back in action at full throttle on May 7th (Tuesday), ready to tackle your questions and requests with gusto!

In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find loads of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel). These gems might just have the answers you're looking for while we're kicking back.

Thanks a bunch for your understanding and support!

Catch you on the flip side!

Warm regards,

TMS

Okay
  Public Ticket #2947394
Display Data From Two Custom Post Types In Same Row
Closed

Comments

  • Jonathan Roper started the conversation

    Hi there,


    I wondered if you could answer a question I have?

    I essentially have two custom post types called "slot" and "session". Each "slot" then has four fields called "A" "B" "C" & "D" where then I am then providing the ID of the session. The idea is then that each slot can have up to 4 sessions. 

    What I'm now looking to do is have WpDataTables show a table of slots with the associated sessions. However, my question is if the slots are only being given ids of the associated sessions, is there a way for WpDataTables to be able to get the associated session posts and then display the data I need from those posts, or is this not possible? If it is, then could you provide a little guidance regarding how to do this?

    If it's not possible, then if I gave each session a datetime field, is there a way I can get wpDataTables to create each row based on the different datetimes that are provided rather than the actual WordPress post? This seemed more complicated compared to the 1st option but I could be wrong.

    Thanks,

    Jonathan

  •  1,692
    Miloš replied

    Hi, Jonathan.

    Thanks for showing interest in our plugin.

    - Could you try to give us a bit more detail about how the tables would look like, how would you set up the columns, for the custom posts? Would be best to add screenshots if possible.

    -What would you use as the data source, perhaps file-based, or SQL, manual tables?

    Here is a bit of documentation about ways to create tables in wpDataTables - https://wpdatatables.com/documentation/general/table-creation-wizard-overview/

    - Seems to be the best way to accomplish this would be using a foreign key relation, between split tables. You could choose a "store value", to pull a "session ID" from another table, which would be used as a row identifier, and then you could select another column as "display value" (such as any data you need to display from the Post).

    8889428134.png

    Here is a documentation section with more details, and a step by step example about using foreign keys with wpDataTables, if you could please take a look - https://wpdatatables.com/documentation/front-end-editing/configuring-table-relations-foreign-key/

    - Contact us further if you need more details, or if this was perhaps not what you meant to achieve.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables