0

I'm using this code for a dropdown of categories. On selection of the dropdown the desired category is displayed using the archive template. I cannot for the love of me get the template hierarchy to work.

<form>
<select name="tag-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
<option value='#'>Select Taxonomy terms</option>
<?php $taxonomies = array('service-category');
$args = array('orderby'=>'name','hide_empty'=>true);
echo get_terms_dropdown($taxonomies, $args); ?>
</select>
</form>

I am using a custom post type called 'services' and a custom taxonomy 'service-category'. Is there a way to tell the search to use a different archive.php template?

0

From codex - you should be able to use taxonomy-service-category.php template to display service-category posts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.