Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

brand_product_search

// WP_Query arguments
$args = array(
	'name'                   => 'titlesearch',
	'post_type'              => array( 'product' ),
	'post_status'            => array( 'publish' ),
	'author'                 => '1212',
	'nopaging'               => false,
	'paged'                  => '3',
	'posts_per_page'         => '20',
	'order'                  => 'DESC',
	'orderby'                => 'date',
	'tax_query'              => array(
		'relation' => 'OR',
		array(
			'relation' => 'OR',
			array(
				'taxonomy'         => 'product_cat',
				'terms'            => array( '1', '3', '4' ),
				'field'            => 'term_id',
				'operator'         => 'IN',
				'include_children' => true,
			),
		),
		array(
			'taxonomy'         => 'product_tag',
			'terms'            => array( '4', '1', '7', '8' ),
			'field'            => 'term_id',
			'operator'         => 'IN',
			'include_children' => true,
		),
	),
);

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