Display posts on a page that share the same taxonomy term as the page itself (e.g., both are tagged with "Seattle").
Solution:
Create a View:
- Go to Toolset > Views.
- Create a new View called "Related Content."
- Select the post types (e.g., posts and pages) to display in the View.
Set the Query Filter:
- In the Query Filter section of the View, add a filter for the taxonomy (e.g., "Locations").
- Choose "Select posts with taxonomy:
Locations the same as the current archive page".
Add the View to the Template:
- Edit the archive page template in Toolset or your theme.
- Add the View block or shortcode to the template where you want the related posts to display.
The user’s Toolset View on the Search page displays only 10 posts with pagination instead of showing all posts on a single page.
Solution:
- Edit the page containing the View.
- Open the Block Navigator (click the top-left hamburger menu in the editor).
- Select the View Block in the Block Navigator.
- In the right-hand Block Settings sidebar, locate the Pagination section.
- Deactivate the pagination option to display all results on a single page.
I need to create a view that displays posts from a custom post type (CPT) published between two selected dates. The end-user should be able to select the date range (start and end) using calendar date pickers on the front end.
Solution:
Create a custom field to store the published date of posts. Use the legacy Views interface to create the view, and manually add select boxes for the date range. Then, apply custom code to modify the query and reload the page with filtered results.