With the Views plugin you can create different Views elements to display all your custom types and content on the front-end, without coding. You can also create powerful parametric searches and add pagination to your content lists.
When you ask for help or report issues, make sure to tell us the options of your View.
Viewing 15 topics - 781 through 795 (of 1,355 total)
Problem: I have a View of posts in which I have nested another View of taxonomy terms. I would like to filter the View of taxonomy terms so that only those terms applied to the current post in the loop are displayed. If no terms are found associated with the current post in the loop, that post should not be displayed in the results.
Solution: Use the legacy View editor to create and manage nested Views, since this feature is not supported in the Block editor. In the inner nested View, add a taxonomy term Query Filter that filters by the current post. In the Loop Editor, insert the wpv-taxonomy-title shortcode in the loop to display the term title, or use other shortcodes to display other information like the term slug, term archive link, or custom term fields. Include information about the parent post in the wpv-items-found section using shortcodes, but do not place parent post shortcodes inside the wpv-loop tags. Anything in the wpv-loop tags will be repeated for each matching term.
Problem: I have a nested View structure where the outer View shows posts and the inner View shows terms from a hierarchical taxonomy. The nested inner View should be filtered so that only the terms associated with each post in the outer View loop are displayed in the inner View. I would also like to hide any terms that have hierarchical parent terms.
Solution: Use two filters in the nested View. One Query Filter should be based on the term parent, where the term parent is None. This will show only top-level terms from the hierarchy. The other Query Filter should be based on the taxonomy term, and should be set by the current post. This will hide unrelated terms from each nested View.
Problem: I have a nested View structure that shows parent posts in the outer View and child posts in the nested View. In some cases the parent post has no child posts, and I would like to hide those parent posts in the results. The problem is that the nested child post View is filtered. Is there a conditional that tests whether or not a parent post contains these filtered child posts?
Solution: You can solve this without custom code by restructuring the Views. Instead of displaying the parent post information in the outer View, display the parent post information in the nested child View, inside wpv-items-found but outside wpv-loop. Use the item attribute to display parent post information with any shortcodes in the nested View, since the post context in the nested View is the context of the child posts. The syntax for the item attribute is item="@relationship-slug.parent" in a typical one-to-many (O2M) relationship.