function dt_woocommerce_add_product_template_to_search() { if (function_exists('presscore_search_content_templates')) { presscore_search_content_templates()->add_action('product', 'dt_woocommerce_search_loop_post_content'); } }
$config->set('template.layout.type', 'masonry'); $archive_page_id = apply_filters('presscore_archive_page_id', null); presscore_config_base_init($archive_page_id); get_header(); ?> <!-- Content --> <div id="content" class="content" role="main"> <?php if (have_posts()) { do_action('presscore_before_loop'); do_action('presscore_before_search_loop'); // backup config $config_backup = $config->get(); $search_content_templates = presscore_search_content_templates(); // masonry container open echo '<div ' . presscore_masonry_container_class(array('wf-container')) . presscore_masonry_container_data_atts() . '>'; while (have_posts()) { the_post(); $post_type = get_post_type(); switch ($post_type) { case 'post': $config->set('show_details', false); // populate config with current post settings presscore_populate_post_config(); dt_get_template_part('blog/masonry/blog-masonry-post'); // restore config $config->reset($config_backup); break; case 'dt_portfolio':