I'm loading custom post type to different pages by changing cat id and sometimes post type name
query_posts(array(
'post_type' => 'posttype_name','posts_per_page'=>-1,
'tax_query' => array(
array(
'taxonomy' => 'type',
'terms' => cat_id )// soups
))
);
I want to change the "posttype_name" and "cat_id" using a advanced custom field, something like below so I can generate more pages using 1 templates for different posttypes. Below method is not working, I also tried assigning a variable to the cf and add the variable to the array, no results. I may be doing something wrong.
'taxonomy' => 'the_field('posttype_name');'
Soo far no luck, can any share some idea how to impliment this