I have a custom post type called movies and I need to quickly switch the template that displays the movies cpt on the front end via a link. How can this be done?
Files I have:
single-movies.php
template-movieslanding.php
template-movieswholesale.php
Functionality: A link group is displayed on each of the three templates as demonstrated below. These links are only displayed to logged in staff. The staff are not technical in the least and need a simplistic solution.
Views: Overview | Landing Page | Wholesale
When each link is clicked I need to switch to that template. All templates use the same custom post type.
Thanks!
~Matt
you can do it like this:
then add a template redirect based on that query_var:
then add this var to your links
Hope this helps