Get custom pages from custom taxonomy
-
Hi Guys,
Using ‘more types’ and ‘more taxonomies’ plugin I have created type ‘Meal’ (based on page), and Taxonomy ‘meal_type’ with 4 taxonomy types (starter, main course, steaks and dessert).
All the meals are linked to a taxonomy type, but now I’m having trouble displaying them on the front-end.
Getting the terms is no problem:$terms = get_terms('meal_type',array('orderby'=>'term_order'));
But I’m having trouble getting the pages that belong to that meal_type.
I’ve tried things like:
$args = array( 'post_type'=>'meal', 'category'=> $cat->term_id ); $mealList = get_posts($args);
and
$args=array( 'post_type'=>'meal', 'orderby'=>'menu_order', 'meal_type'=>$cat->ID, 'order'=>'ASC', ); $meal_types = new WP_Query($args);
But I can’t seem to get the right results. What am I doing wrong?
Thanks!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Get custom pages from custom taxonomy’ is closed to new replies.