|
|
Display posts with same taxonomy as page
Commencé par : Robert
in: Toolset Professional Support
Quick solution available
Problem:
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.
|
|
1 |
6 |
Il y a 1 year, 6 months
Robert
|