How can I get this request to use the Custom Post Type page template instead?

Switch the taxonomy.php just like you would the single.php to support specific post custom templates. This is untested code, so it may not work – but, first get the post type $post_type = get_query_var(‘post_type’); So if $post_type contains post_type=”car” then include archive-car.php like this: if ( $post_type=”car” ) get_template_part(‘archive-car’); elseif ( $post_type=”boat” ) get_template_part(‘archive-boat’); elseif … Read more

Passing form inputs into multi-taxonomy query

You mention that with your first attempt you get the URL http://sitename.com/?brand=22 which is correct as you’ve used a get method, but you don’t say what code you’re using for the query. Personally I use this for my form and would agree with wdalhaj to use post instead of get <form id=”brandsearch” method=”post” action=””> <select … Read more

Custom field values to taxonomy terms

Don’t have a time to test it now but something like this should work: // Change or add your own arguments as needed $args = array( ‘post_type’ => ‘post’, ‘numberposts’ => -1, ‘offset’ => 0 ); $my_posts = get_posts( $args ); if ( $my_posts ) { foreach ( $my_posts as $my_post ) { $meta = … Read more

Query posts from a child taxonomy term id

i solved the problem if(isset($_POST[‘main_brand_id’])) { $term_id .= $_POST[‘main_brand_id’]; $term = get_term( $term_id, ‘state’ ); $slug = $term->slug; global $post; $post_id = $post->ID; $args = array( ‘post_type’ =>’dealers’,’taxonomy’=>’state’, ‘term’ => $slug ); $myposts = get_posts( $args ); foreach( $myposts as $post ) : setup_postdata($post); echo ‘<option value=”‘.$post->ID.'”>’ $options .= the_title(); echo ‘</option>’; endforeach; die(); } … Read more