Skip Navigation

[Resolved] Types / Views Beta: How to display intermediary post fields

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

Problem: How can I display custom fields applied to the intermediary post created by the new M2M Relationships beta?

Solution: This functionality is not yet ready and will be implemented in a future beta release.

0% of people find this useful.

This support ticket is created 6 years, 9 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 6 replies, has 3 voices.

Last updated by Twig 6 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#610658

Hey Guys

So just after Christmas, I had this query:
https://toolset.com/forums/topic/types-beta-2-3-new-relationships-moved-out-of-post-meta/

Using the types and views beta

I have a record release, and a music store, with an intermediary for the purchase link.

At the time I couldn't display the custom fields from the intermediary. Since then views beta has updated.

So when I create the relationship, if I expose the intermediary post to the WP-Admin (by 'creating' it during the relationship creation flow), I can query it in the view, and then display its parent (record store) etc as per the old Toolset way of doing things...

But I still dont see how I can query custom fields from the intermediary without exposing the intermediary post to the WordPress admin. As in querying the record store, then displaying fields from the intermediary link.

Is this possible yet, and if so, how so?

Thanks again guys

Jeff

#610661

Actually, even if I do expost the intermediary to the wp admin, it still can't be used.

When I try to query the post type as a child of the post where the view is shown I get:

"This will filter out posts of the following types, because they are not parent of any other post type: Digital Purchases Intermediary Posts"

Stumped

#610900

But I still dont see how I can query custom fields from the intermediary without exposing the intermediary post to the WordPress admin. As in querying the record store, then displaying fields from the intermediary link.
Okay so from the Record Release post, you want to query all related Music Stores and show a list of those results. In that list, you want to include custom field values from the relationship intermediary post, which is a child of both Music Stores and Record Releases. Is that correct?

There does not appear to be a way to do this from the GUI, but let me reach out to my 2nd tier support team for some clarification. Perhaps there is a way to do it by inserting a shortcode manually.

#610948

Thanks for that Christian,

Initially when creating the relationship between music release and music store. On the release I would query the music store and want to show the intermediary field, which had the price for the release and the purchase link.

When I created this relationship, I chose not to expose the intermediary in the WP-Admin

As you correctly stated.

I then tested it, by creating a new, duplicate, relationship. This time I displayed it in the WP-Admin. When I went to create my View, I could query the intermediary directly now. I figured I would still be able to 'query posts that are children of posts where this view is shown' but the new GUI no longer has this option. If that was possible, I could have just queried the intermediary child post, and then used fields from the $parent.

Around December 29th all this wasn't yet possible, the views GUI hadn't been updated with a method to pull in fields from the intermediaries.

But actually, when I came back and checked it said the latest beta was released on Jan 9th, so figured it might have been added. However, digging a bit deeper, it seems the Jan 9th release is the same version as I had installed in late December, so I am a little confused.

Anyway, I don't mind waiting until this functionality is implemented. I am just very excited to get going with these new relationships, and look forward to any new betas.

If there is a way to implement this with a shortcode, happy to test that too.

Thanks

Jeff

#611493

Hi, our developers have provided some feedback to let me know that neither the GUI nor any shortcode functionality for this part of the new M2M feature set has been implemented yet. It's in the queue for our developers, so you'll have the ability to access relationship meta data in a future beta release. For now, unfortunately it's not available.

#611631

Hi Christian,

Yeah, I thought that might be the case.

No problem.

Jeff

#627158

Any idea when this may be implemented? I am in need of this functionality as well. I cannot display intermediary post fields in a view for a parent CPT. Thanks!