Getting details
-
I have a post type called “lab” which has a taxonomy called “states”.
I added this plugin and created a new post called “careers” and added a CPT “lab” as its taxonomy.
So this is the order
States
– Labs
–CareersWhen I click on a state I get its slug and list all “Lab” now I need to get all Careers that I added to a lab
How can I get it? I tried the code below:
$args = array( 'post_type' => "careers", 'tax_query' => array( 'taxonomy' => 'lab', 'field' => 'slug', 'terms' => 'global-pathology', 'include_children' => false ), 'posts_per_page' => -1, 'orderby' => 'date', 'order' => 'DESC'); $posts = get_posts($args);
But it’s not filtering by lab taxonomy
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Getting details’ is closed to new replies.