test1
// WP_Query arguments
$args = array(
'post_type' => array( 'post' ),
'post_status' => array( 'publish' ),
'order' => 'DESC',
'orderby' => 'date',
'tax_query' => array(
array(
'taxonomy' => 'category',
'terms' => '100',
'field' => 'term_id',
'include_children' => true,
),
),
);
// The Query
$ricerca = new WP_Query( $args );
// The Loop
if ( $ricerca->have_posts() ) {
while ( $ricerca->have_posts() ) {
$ricerca->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();