Problem: I use a custom taxonomy "Directors" applied to a CPT "Movies". I also have a custom post type "Directors". I would like to be able to show all the movies by each Director in my Directors taxonomy archive, as well as information from the Director CPT. I would also like to be able to show all the Movies by the current Director in the Director CPT single post.
Solution:
- Create Director CPT posts and Director taxonomy terms such that each Director CPT has a corresponding Director Term. The slugs should always match.
- Associate the Director term with all Movies by that Director.
- On the Director taxonomy archive, insert a View of Movies filtered by Director taxonomy term, set by a shortcode attribute. The term slug can be determined using the wpv-taxonomy-archive shortcode.
- On the Director post Layout, insert a View of Movies filtered by the Director taxonomy, set by a shortcode attribute.
- Fill in the value of the shortcode attribute with the current Director post's ID by using a custom shortcode to convert the current Director's post slug into its post ID. The slug of the current Director post will match the slug of the same Director taxonomy term, so the View of Movies will show the correct results.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 22 replies, has 2 voices.
Last updated by 6 years, 10 months ago.
Assisted by: Christian Cox.