Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

category query

$portfolio_pieces_by_cat = array(
	array(
		'taxonomy'         => 'portfolio_category',
		'field'            => 'slug',
	),
);