Pagination on Custom Tax Pages Removes Spaces from Query Vars
I’m answering this just so it doesn’t stay in the unanswered list. This was a core bug that has been patched in 3.3. http://core.trac.wordpress.org/ticket/18086
I’m answering this just so it doesn’t stay in the unanswered list. This was a core bug that has been patched in 3.3. http://core.trac.wordpress.org/ticket/18086
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
Have a look at the codex page for wp_list_categories. $args = array( ‘taxonomy’ => ‘article_topics’ ); wp_list_categories( $args ); For the taxonomy terms assigned to individual posts, get_categories also accepts a taxonomy argument.
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
Add to the taxonomy registration: ‘rewrite’ => array( ‘hierarchical’ => true )
$object_id is supposed to be a post’s ID, make sure first that $post->ID would even output an ID, if not, the problem lies there.
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
I can answer your question! I just had the same exact issue myself and figured it out today, so I know exactly what you need to do. I give very detailed instructions and code on my own question posting, so go look there and see if it solves the issue for you. Let me know … Read more
Looks like it’s not something can be done without digging into the code. However i found a plugin the fits my needs pretty well: http://wordpress.org/extend/plugins/taxonomic-seo-permalinks/ with this you can just set /%your-taxonomy%/%postname%/ in the permalinks settings page and your done!
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