Post relations is a JetEngne functionality that creates connections between different post types. There are 3 types of post relations available: one-to-one, one-to-many, and many-to-many. In this tutorial, we’ll explore how to set the legacy relations between two posts if we need the “one-to-one” post relations type.
To create relationships between posts with refactored Relations feature follow this tutorial.
The “one-to-one” posts relation is set when there is only one child post that can be related to one parent post, and vice versa.
1 Step— Creating a post relation
Log into your WP Dashboard and navigate to the JetEngine > Relations tab. Click the “Add New” button.
Enter the Name of the relation. Make sure to set the Parent and Child post type correctly. In the Relation Type drop-down menu choose the “One to one” option.
At last, click the “Add Relation” button to complete the process.
2 Step— Setting a child page
Now you need to open the parent post in a default editor and navigate to the Related Posts block.
Choose the child post by typing 3 or more characters of the title, and then click “Update” button.
3 Step— Pulling related post to the template
Drag the Dynamic Field widget to the page of the Single parent post.
In the Source field select the “Meta Data” option. Then, in the Meta Field block select the child posts option. In order to display the post, you need to enable Filter field output option and select “Related posts list” in the Callback dropdown. And voila!
As you can see, that is pretty simple. Check it out!