Views is a WordPress plugin that lets you easily display content on your website's front-end in any way you choose.
Views User Guides include detailed documentation for creating lists of content, templates for content and archive page and also explain how to create parametric searches for any content type.
When you ask for help or report issues, make sure to tell us the versions of the Toolset plugins that you have installed and activated.
Viewing 15 topics - 1,471 through 1,485 (of 3,129 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.
That would display the nested View and pass the current post ID from View 1 into an attribute attr1, and it would pass the value of custom field some-slug from the current post of View 1 into an attribute attr2.
Then in View #2, you can set various Query Filters to respond to these shortcode attributes, or you can use the wpv-attribute shortcode to access those attributes in the Loop editor:
Parent post ID: [wpv-attribute name="attr1"]<br />
Parent post custom field "some-slug": [wpv-attribute name="attr2"]
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.
Problem: I would like to delete a WordPress Archive but I cannot find it in the list of WordPress Archives at Toolset > WordPress Archives.
Solution: The missing WP Archive is in "draft" status, not "publish". Draft archives are currently not displayed in the WP Archives list, so this one will not appear until it is published. From wp-admin > Toolset > Dashboard, click the link to edit this archive. Or if you know the draft archive ID, you can go directly to the archive editor at a URL like this:
Publish the archive temporarily, and it will appear in the main archives list at Toolset > WordPress Archives. Then you can Trash / Delete the archive from the list.