Skip Navigation

[Resolved] Display information from related post in a View

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

Problem: I have a one-to-many post relationship set up between two custom post types. In a View of the child posts, I would like to display information from the parent post.

Solution:
In the Blocks View editor, you can display related post information by following the documentation linked below.

In the legacy Views editor, you can use the Post Selection tab in the Fields and Views popup to select the related post you want to display. See the screenshots in the replies below for more information.

Relevant Documentation:
https://toolset.com/course-lesson/displaying-related-posts/#displaying-many-related-items

This support ticket is created 4 years, 1 month 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 2 replies, has 2 voices.

Last updated by avansisI-2 4 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1874383

Good,

I have a form where I choose a relation, and I need to be able to display that reference in a view.

The form code is this

	<div class="form-group">
		<label>[cred_i18n name='@productos.parent-label']Elige el negocio al que subir tu producto[/cred_i18n]</label>
		[cred_field field='@productos.parent' class='form-control' output='bootstrap' select_text='--- not set ---' required='false' author='$current']
	</div>
#1874977
3-post-selection-tab.png
2-select-field.png
1-click-fields-and-views.png

Hello, it depends on whether you are building the View in the Block Editor or the legacy Views Editor.

Blocks View editor:
See our documentation here:
https://toolset.com/course-lesson/displaying-related-posts/#displaying-many-related-items

Legacy Views editor:
If you want to display information from related post type "B" inside a View of post type "A", you can use the Post Selection tab in the Fields and Views popup to select the related post you want to display. See the screenshots here for more information.

#1875011

My issue is resolved now. Thank you!