Taxonomy Problem
-
Hi,
the title didnt go that much into detail but i dont know how to describe it correctly. Heres my Problem:
I got a custom post type named ‘fruitshop’. What i also got is a registered taxonomy with the name ‘fruits’. Now on the template for the fruitshop i list the taxonomy terms in a dropdown with:
<?php wp_list_categories('orderby=id&&use_desc_for_title=0&taxonomy=fruits&title_li='); ?>
Thats works pretty well. If i choose for example ‘banana’ out of the dropdown it redirects to fruitshop/fruits/banana. (fruitshop/fruits) is my rewrite slug.
The Problem now is that i get all fruits displayed instead of just bananas. How do i get the term that i just selected in the dropdown, thats my big question. I used alot get_term and get_term_by etc. but nothing seems to work proberly.
ps: Thats how it works if i enter my term manually
$args = array( 'post_type' => 'fruitshop', 'fruits' => 'bananas' ); $query = new WP_Query( $args );
So the only thing i need to know is how do i get the term that i selected? Maybe iam missing something. 🙂
Thanks a lot in advance for any help!!
Bye,Michael
- The topic ‘Taxonomy Problem’ is closed to new replies.