Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Consultar Productos

Consultar Productos

// WP_Query arguments
$args = array(
	'post_type'              => array( 'producto' ),
	'post_status'            => array( 'publish' ),
	'orderby'                => 'title',
);

// The Query
productos = new WP_Query( $args );

// The Loop
if ( productos->have_posts() ) {
	while ( productos->have_posts() ) {
		productos->the_post();
		// do something
	}
} else {
	// no posts found
}

// Restore original Post Data
wp_reset_postdata();