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 - 796 through 810 (of 1,097 total)
Problem:
The issue here that the user wanted to display his Parent/Child post in the format
Category one
- article
- article
Category three
- article
- article
- article
Category six
- article
Category ten
- article
- article
- article
- article
Problem:
How to display child post without using views but using PHP API
Solution:
you can display the output using view or using PHP API, without writing PHP how can we expect something to display. So basically there are only two way, either use views or PHP.
Problem:
How to filter view by child post by taxonomy term using shortcode attribute and display it with different layout's visual editor cells
Solution:
To filter your child posts by category, you can use view's shortcode argument so you can use same view to filter multiple category and display it with different layout section.
Problem: I have two custom post types in a one-to-many relationship. On the child post type single post page, I would like to show a list of brother (sibling) posts - i.e. all other posts of the child custom post type that have the same parent post. I have implemented a "Post parent" filter, but it doesn't seem to work as expected.
Solution: The "Post parent" filter isn't intended for use in one-to-many relationships between two different post types. It is only intended for use in a hierarchical post type, like the native WordPress "Pages" post type. Instead, you should use the "Post relationship" filter, and use a shortcode attribute to supply the post parent ID:
If I click on the button nothing happens. If I place code for button into view for parent, it works. And after, how to secure that only the related post-body will show, not all of them?
Solution:
You will need to assign a unique HTML ID attribute for each div tag, for example, you can change the codes from: