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.
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?
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....
My issue is resolved now. Thank you!