Views is a WordPress plugin that lets you display post relationships.
In our user guides, you can find more information on how to display child posts, related posts, brother pages, fields of parents and fields of grandparents.
When you ask for help or report issues, make sure to tell us the type of the relationship you are trying to build and the structure of your data.
Viewing 15 topics - 226 through 240 (of 249 total)
Problem: I have two custom post types. On the template for CPT A, I would like to display two posts from CPT B in a View. In the post editor for CPT A, I would like to choose which two posts should be displayed in the View.
Solution: Use a many-to-many relationship between CPT A and CPT B to select which posts from CPT B should be displayed in each post of CPT A. Use a View of CPT B with a post relationship filter in the template for CPT A to display the selected posts.
Problem: I have a one-to-many relationship set up between two post types. In the child post single page, I would like to display a View of other sibling child posts.
Solution: This feature does not currently exist in Blocks, but in classic Views you can create a Query Filter for post relationship, where the parent post is set by a shortcode attribute "wpvrelatedto". Then you can provide the current post's parent post ID in the View shortcode as shown here: