I have a custom post type named 'tours' and custom taxonomy named 'tourtypes' so i can categorize it into terms like 'cultural tour', 'sports tour' etc.
I do not know much about dealing with taxonomy. But I want to extend it so that instead of outputting all 'tours' post, user can also choose which tour category (term) they want.
in the theme template taxonomy-tourtypes.php this is part of the code to display the term title which work:
I have a custom post type named 'tours' and custom taxonomy named 'tourtypes' so i can categorize it into terms like 'cultural tour', 'sports tour' etc.
I do not know much about dealing with taxonomy. But I want to extend it so that instead of outputting all 'tours' post, user can also choose which tour category (term) they want.
in the theme template taxonomy-tourtypes.php this is part of the code to display the term title which work:
<?php echo $term->name; ?> Category
<?php } ;?>But when it comes to the part where i want to query the specified term it didnt work.
I manage to get it to work if i type in the term slug directly eg.
I'm sure i just need a little change on the wp_query. Anyone care to point to the right code..i almost give up with this
anyone got any idea?