Untitled Snippet
// WP_Query arguments
$args = array(
'post_type' => array( 'pago' ),
'post_status' => array( 'publish' ),
'posts_per_page' => '-1',
);
// The Query
$query_pago = new WP_Query( $args );
// The Loop
if ( $query_pago->have_posts() ) {
while ( $query_pago->have_posts() ) {
$query_pago->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();