Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Custom posto con custom field

// WP_Query arguments
$args = array(
	'post_type'              => array( 'pippo' ),
	'author'                 => '123',
	'meta_query'             => array(
		array(
			'key'     => 'ufficioweb_id',
			'value'   => '356',
			'compare' => '=',
			'type'    => 'CHAR',
		),
	),
);

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