Portfolio Query
Portfolio Query with post type and taxonomy
// WP_Query arguments
$args = array(
'post_type' => array( 'portfolio' ),
'tax_query' => array(
array(
'taxonomy' => 'portfolioslist',
'terms' => array( 'all', 'codeigniter', 'laravel', 'wordpress' ),
'field' => 'slug',
),
),
);
// The Query
$queryPortfolio = new WP_Query( $args );
// The Loop
if ( $queryPortfolio->have_posts() ) {
while ( $queryPortfolio->have_posts() ) {
$queryPortfolio->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();