I’d like to utilize archive.php or tag.php to display all custom post types that have the tag that was searched/entered in the url string.

For instance, I have a custom post type called “jobs” and over time many different tags will be added to jobs. Let’s say I add the tag “local” to the post type “jobs.”

If I go to the page sitepath/tag/local a page appears but I can’t figure out how to set up the loop on the page so it displays the all the jobs that have been tagged with “local”.

I understand I could pass in $args = array( ‘post_type’ => ‘jobs’, ‘tag’ => ‘local’), but this doesn’t scale to fit the solution I eventually need, where I could create new jobs with different tags, and then pull them up based on a pre-established url pattern.

Read more here: How to set up a page in WordPress that displays custom post types by a tag in the url?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: