portfolio query
// WP_Query arguments
$args = array(
'post_type' => array( 'avada_portfolio' ),
'nopaging' => true,
'posts_per_page' => '-1',
'ignore_sticky_posts' => false,
'order' => 'ASC',
'orderby' => 'menu_order',
'tax_query' => array(
array(
'taxonomy' => 'portfolio_category',
'terms' => 'brooklyn',
'field' => 'slug',
'operator' => 'IN',
'include_children' => true,
),
),
);
// The Query
$com_query = new WP_Query( $args );
// The Loop
if ( $com_query->have_posts() ) {
while ( $com_query->have_posts() ) {
$com_query->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();