• Hello,

    I’m trying to query team members, but when i try to add the category (which i created in teams section) nothing is showing up.

    	<?php $loop = new WP_Query( array( 
    	
    'post_type' => 'thegem_team_person',  
    'posts_per_page' => -1, 
    'cat' => '269', ---- this is the category id, the slug is fof  ----
    'orderby' => 'date', 
    'order' => 'ASC',
        
    
    ) ); 
    ?>

    Do you guys have any idea what may be the thing that is not working here.

    Thanks,

Viewing 1 replies (of 1 total)
  • Thread Starter glaukabazi

    (@glaukabazi)

    Hi,

    I found the solution, in case anyone will ever need it.

    <?php $loop = new WP_Query( array( 
    	
    'post_type' => 'thegem_team_person',  
    'posts_per_page' => -1, 
    'orderby' => 'date', 
    'order' => 'ASC',
     --this is the solution ----   'tax_query' => array(
            array(
                'taxonomy' => 'thegem_teams',
                'field'    => 'slug',
                'terms'    => 'fof',
            ),
        ),
    ---- to here ----
    ) ); 
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘query team members’ is closed to new replies.