Query arguments, Query and Loop
WP_Query arguments, The Query, The Loop
// WP_Query arguments
$args = array (
'post_type' => 'diensten',
'category_name' => 'diensten',
'order' => 'DESC',
'orderby' => 'date',
);
// The Query
$diensten_query = new WP_Query( $args );
// The Loop
if ( $diensten_query->have_posts() ) {
while ( $diensten_query->have_posts() ) {
$diensten_query->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();