How do I pass Query Variable to Custom Post Template Archive?
Greetings. I am using /%postname%/ permalinks and want to be able to pass a variable to my custom post type archive. My goal is to have the archive receive a value which I use to sort the individual posts. My overall goal is essentially fake ‘categories’ by assigning the custom posts a meta value and sorting using the value I pass through the url.
A more literal Example:
is the path to my custom post type archive. I want to be able to direct users to this path:
and in the template be able to pull “potatoes” from the query string.
- The topic ‘How do I pass Query Variable to Custom Post Template Archive?’ is closed to new replies.