Step 1: Create a Relationship Between Custom Post Types (CPTs)
This step involves navigating to JetEngine > Relations, defining the relationship type such as Parent β Child, and organizing relationships for your Custom Post Types effectively. These components define how related entries interact dynamically.
Navigate to JetEngine > Relations to establish a connection between your Custom Post Types (CPTs).
Define the relationship type (e.g., Parent β Child or Many-to-Many) and give it a descriptive name.
Save the relation and attach appropriate items/posts to these relationships in your administrative content setup.
For further guidance, you can follow this detailed guide on relationships.
Step 2: Display Child Posts on the Parent Post Page
Set Up the Query:
Go to JetEngine Query Builder and create a new Posts Query.
In the General tab, select your Child CPT and specify the post status.
Set up the query to retrieve related items:
Use the Query:
Now, you can use this query as a custom query in the listing where you want the child posts to appear.
Step 3: Display Parent Posts on the Child Post Page
Set Up the Query in Query Builder:
Open the JetEngine Query Builder and create a Posts Query for the parent post type.
In the General tab, select your Parent CPT.
Add Parent Listing to Child Post Page:
Finally, add the parent listing to the child post page (or to a child post listing) and apply the custom query.
Following these steps, you can display child posts on a parent post page or parent posts on a child post page using JetEngine's Query Builder.
β


