Navigation überspringen

[Gelöst] Display information from related post in a View

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 4 Jahren, 2 Monaten. 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)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von avansisI-2 vor 4 Jahren, 2 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#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!