Tell us what you are trying to do?
We have a directory website. The main CPT is HCCNs, which are health networks. We also have a CPT for EHRs: Electronic Health Records systems.
Each HCCN uses a few EHRs, and the intermediary post type for the relationship has a radio button to determine if they are just a "user" of the system or an "expert".
The issue:
I'm trying to create a view to put on the HCCN single directory page template, to display which EHRs the HCCN uses and whether they are an expert or user of each.
I have followed your documentation (https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-information-from-intermediary-post-types) but I'm not quite there. It shows the post title for the intermediary post, which is nonsense, rather than the name of the EHR, and I also can't get it to display the expert/user value either. Could you please take a look? I'll post a screenshot of the View. Happy to provide a login for the site.
Hi, I can see the intermediary post type is chosen as the View's content, so keep in mind the context of the loop result is going to be the intermediary post type. Down in the Loop Template for this View, I can see the post link shortcode is included like so:
Since the shortcode has no "item" attribute, the link and title of the intermediary post type (i.e. the context of the loop) will be displayed by this shortcode. If you want to display the title/link of some other post, like a post related to the intermediary post (i.e. the context of the loop), then steps 4 A&B in that document show how you can use the "Edit" button in the Loop Wizard to choose a related post. In your case, that will be the EHR. For future reference, you can select a related post like this in the Loop Wizard. If you want to change it now, you can just delete the wpv-post-link shortcode from the loop template and reinsert that shortcode using the Fields and Views button. In the popup, you'll select the post title with link and then click "Post Selection" to choose a related post. The system will generate the proper syntax for the shortcode and insert it automatically.
On the other hand, the custom field is in the context of the intermediary post type, so no "item" attribute is required. As a test, please remove the item attribute and let me know the results. If the custom field value is not displayed as expected, I'll be glad to take a closer look. Please provide login credentials in the private reply fields here and let me know where I can see the View on your site.