Step 1: Create a Relationship Between Custom Post Types (CPTs)
Begin by connecting the two Custom Post Types (CPTs) you want to link as parent and child items.
Follow this guide on creating relationships between posts to establish the connection.
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.
β