Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Query Client Portal Projects

Assumes you have passed current user ID as $cur_user_id

// WP_Query arguments
$args = array(
	'post_type'              => array( 'leco_client' ),
	'post_status'            => array( 'publish' ),
	'order'                  => 'DESC',
	'orderby'                => 'title',
	'meta_query'             => array(
		array(
			'key'     => 'leco_cp_client',
			'value'   => '$cur_user_id',
			'compare' => 'IN',
			'type'    => 'NUMERIC',
		),
	),
);

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