array('post', 'product'),
'posts_per_page' => 15,
's' => $s_key,
);
$queried_posts = get_posts($args);
$sldttl = count($queried_posts);
$markup = "";
$markup .= '
';
foreach ($queried_posts as $q_post) {
$sid = $q_post->ID;
if ($q_post->post_type == 'product') {
$s_prod_obj = wc_get_product($sid);
$markup .= '
';
} else {
$markup .= '
';
}
}
$markup .= '
';
$output_data[] = array(
'markup' => $markup,
'sld_count' => $sldttl
);
echo json_encode($output_data);
die();
}