Skip Navigation

[Resolved] Intermediary Posts Custom Field Content isn't Displaying….

This support ticket is created 5 years, 11 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 3 replies, has 2 voices.

Last updated by LCR 5 years, 11 months ago.

Assisted by: Beda.

Author
Posts
#1194536

LCR

I am trying to:
Display custom fields content setup in an intermediary post type. I have linked two post types together (People & Locations) I have the locations displaying on a map and the peoples content within the marker pop-up window. I also want the intermediary post content that is linking the posts together to display in the popup window, but it's not.

Link to a page where the issue can be seen:
hidden link

I expected to see:
I expect to see the locations to display on the map and have the the content from the other the People Post type and the intermediary relationship posts content to display in the marker popup window.

Instead, I got:
Just the people post type content and none of the intermediary custom field post type content.

#1194658

I can successfully display fields of IPO (intermediary post types) in an M2M (many to many) relationships.

1. Create the relationship where the IPO has some fields and add some related posts + make sure the IPO fields are populated.
2. Create a View listing the one end of the relationships posts, by the other end (where the view is inserted). This means you query post type A in a relation to the post where the view is inserted to
3. In the View loop, search the fields to output in the "Views and Fields" GUI and tell it to seek for the post as set in a Types Relationship, then choose the IPO post type.

This View then inserted to the single related post will show the IPO's of its relationships fields.

The View must query the one post type in the relationship, let's say Post A, by their relation to Post Type B, as in:
Select posts in a Toolset Type A relationship that are related to the Post where this View is shown.

Then, the ShortCode to show the IPO's field is similar to:
[types field='my-IPO-custom-field-slug' item='@toolset-type-a-toolset-type-b.intermediary'][/types]

Can you try this to see if it works?

#1195456

LCR

This is what I have currently in my view for the content in the loop:

[wpv-map-marker map_id='map' marker_id="[wpv-post-id]" data-year="[types field='residence-from' style='text' format='Y'][/types]" marker_title="[wpv-post-title]" id="$posttype" marker_icon='//victorians.ucalgary.ca/wp-content/plugins/toolset-maps/resources/images/markers/Home.png' marker_field='wpcf-current-google-address' item='$parent']

<p>Married Name: [types field='married-name' separator=', ' item='@people-location.parent'][/types]</p>
<p>Forename: [types field='forename' separator=', ' item='@people-location.parent'][/types]</p>
<p>Residence to: [types field='residence-to' style='text' format='Y' item='@people-location.intermediary'][/types]</p>
<p>Residence from: [types field='residence-from' style='text' format='Y' item='@people-location.intermediary'][/types]</p>
<p>Address: [wpv-post-title]</p>
View

[/wpv-map-marker]

So far the following fields show up:
1. Married Name
2. Forename
3. Address
4. Link to post

The two that aren't working are Residence to and from - I have these have data in them. I am just using the short code generated in the view from the plugin but it's not displaying the content....

#1195583

LCR

My issue is resolved now. Thank you!