wp_query empresas vet
// WP_Query arguments
$args = array(
'post_type' => array( 'empresa' ),
'post_status' => array( 'publish' ),
'nopaging' => false,
'posts_per_page' => '6',
'tax_query' => array(
array(
'taxonomy' => 'tipo_de_empresa',
'field' => 'term_id',
),
),
);
// The Query
$loop = new WP_Query( $args );
// The Loop
if ( $loop->have_posts() ) {
while ( $loop->have_posts() ) {
$loop->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();