Example #1
0
        public static function content($is_ajax = false)
        {
            global $wp_query;
            ?>
			<?php 
            if (is_singular('product')) {
                while (have_posts()) {
                    the_post();
                    wc_get_template_part('content', 'single-product');
                }
            } else {
                ?>
				<?php 
                /**
                 * script
                 * {{
                 */
                if (!$is_ajax) {
                    wp_enqueue_script('vendor-carouFredSel');
                }
                ?>
				<?php 
                if (apply_filters('woocommerce_show_page_title', true)) {
                    ?>
	
					<h1 class="page-title"><?php 
                    woocommerce_page_title();
                    ?>
</h1>
	
				<?php 
                }
                ?>
				<?php 
                do_action('woocommerce_archive_description');
                ?>
					<?php 
                $current_view_mode = dh_get_theme_option('dh_woocommerce_view_mode', 'grid');
                if (isset($_GET['mode']) && in_array($_GET['mode'], array('grid', 'list'))) {
                    $current_view_mode = $_GET['mode'];
                }
                $grid_mode_href = $current_view_mode == 'list' ? ' href="' . esc_url(add_query_arg('mode', 'grid')) . '"' : '';
                $list_mode_href = $current_view_mode == 'grid' ? ' href="' . esc_url(add_query_arg('mode', 'list')) . '"' : '';
                $dh_ul_product_class = '';
                $woo_products_pagination = dh_get_theme_option('woo-products-pagination', 'page_num');
                if ($woo_products_pagination === 'infinite_scroll') {
                    $dh_ul_product_class = 'infinite-scroll-wrap';
                } elseif ($woo_products_pagination === 'loadmore') {
                    $dh_ul_product_class = 'loadmore-wrap';
                }
                ?>
					<div class="shop-toolbar">
						<?php 
                if (!dh_get_theme_option('woo-shop-filter', 0)) {
                    ?>
						<?php 
                    woocommerce_catalog_ordering();
                    ?>
						<?php 
                }
                ?>
						<div class="view-mode">
							<a class="grid-mode<?php 
                echo $current_view_mode == 'grid' ? ' active' : '';
                ?>
" title="<?php 
                esc_attr_e('Grid', 'sitesao');
                ?>
" <?php 
                echo $grid_mode_href;
                ?>
><i class="fa fa-th"></i></a>
							<a class="list-mode<?php 
                echo $current_view_mode == 'list' ? ' active' : '';
                ?>
" title="<?php 
                esc_attr_e('List', 'sitesao');
                ?>
" <?php 
                echo $list_mode_href;
                ?>
><i class="fa fa-list"></i></a>							
						</div>
						<?php 
                if (dh_get_theme_option('woo-shop-filter', 0)) {
                    ?>
							<div class="filter-toggle-button">
								<a class="filter" title="<?php 
                    esc_attr_e('Filter', 'sitesao');
                    ?>
" href="#"><i class="fa fa-filter"></i> <?php 
                    esc_html_e('Filter', 'sitesao');
                    ?>
</a>
							</div>
						<?php 
                }
                ?>
					</div>
					<?php 
                if (dh_get_theme_option('woo-shop-filter', 0) && is_active_sidebar('sidebar-shop-filter')) {
                    ?>
					<div class="sidebar-shop-filter" data-toggle="shop-filter-ajax">
						<?php 
                    $sidebars_widgets = wp_get_sidebars_widgets();
                    $count = count((array) $sidebars_widgets['sidebar-shop-filter']);
                    $count = absint($count);
                    ?>
						<div class="sidebar-shop-filter-wrap sidebar-shop-filter-<?php 
                    echo esc_attr($count);
                    ?>
">
							<?php 
                    dynamic_sidebar('sidebar-shop-filter');
                    ?>
						</div>
					</div>
					<?php 
                }
                ?>
					<div class="shop-loop-wrap <?php 
                echo $dh_ul_product_class;
                ?>
">
						<div class="filter-ajax-loading">
							<div class="fade-loading"><i></i><i></i><i></i><i></i></div>
						</div>
						<div class="shop-loop <?php 
                echo esc_attr($current_view_mode);
                ?>
" >
							<?php 
                if (is_search() && is_post_type_archive('product')) {
                    ?>
								<h3 class="woocommerce-search-text"><?php 
                    dh_page_title();
                    ?>
</h3>
							<?php 
                }
                ?>
							<?php 
                if (have_posts()) {
                    ?>
							<?php 
                    woocommerce_product_loop_start();
                    ?>
								<?php 
                    woocommerce_product_subcategories();
                    ?>
								
								<?php 
                    while (have_posts()) {
                        the_post();
                        ?>
			
									<?php 
                        wc_get_template_part('content', 'product');
                        ?>
			
								<?php 
                    }
                    // end of the loop.
                    ?>
							<?php 
                    woocommerce_product_loop_end();
                    ?>
							
							<?php 
                    do_action('woocommerce_after_shop_loop');
                    ?>
							
							<?php 
                } elseif (!woocommerce_product_subcategories(array('before' => woocommerce_product_loop_start(false), 'after' => woocommerce_product_loop_end(false)))) {
                    ?>
		
								<?php 
                    wc_get_template('loop/no-products-found.php');
                    ?>
				
							<?php 
                }
                ?>
						</div>
					</div>
				<?php 
            }
        }
Example #2
0
        $page_heading_background_image_url = dh_get_theme_option('blog-heading-bg', '');
        $page_heading_title = dh_get_theme_option('blog-heading-title', 'Our Blog');
        $page_heading_sub_title = dh_get_theme_option('blog-heading-sub-title', '');
    }
}
if (defined('WOOCOMMERCE_VERSION') && is_singular('product') && dh_get_theme_option('woo-product-heading', 0)) {
    $page_heading = 'heading';
    $page_heading_background_image_url = dh_get_theme_option('woo-product-heading-bg', '');
    $page_heading_title = dh_get_theme_option('woo-product-heading-title', 'Our Shop');
    $page_heading_sub_title = dh_get_theme_option('woo-product-heading-sub-title', '');
}
if (empty($page_heading_background_image_url)) {
    $page_heading_background_image_url = get_template_directory_uri() . '/assets/images/header-bg.jpg';
}
if (empty($page_heading_title)) {
    $page_heading_title = dh_page_title(false);
    if ($page_heading == 'heading') {
        $page_heading = 'default';
    }
}
if (empty($page_heading_sub_title)) {
    $page_heading_breadcrumb_flag = true;
}
$page_heading_button_flag = false;
$logo_url = dh_get_theme_option('logo');
$logo_fixed_url = dh_get_theme_option('logo-fixed', '');
$logo_transparent_url = dh_get_theme_option('logo-transparent', '');
$logo_mobile_url = dh_get_theme_option('logo-mobile', '');
if ($page_logo = dh_get_post_meta('page_logo')) {
    $page_logo_image_url = wp_get_attachment_url($page_logo);
    if (!empty($page_logo_image_url)) {
Example #3
0
        ?>
		<div<?php 
        echo !empty($heading_menu_anchor) ? ' id ="' . esc_attr($heading_menu_anchor) . '"' : '';
        ?>
 class="heading-container <?php 
        /*heading-border*/
        ?>
">
			<div class="<?php 
        dh_container_class();
        ?>
 heading-standar">
				<div class="heading-wrap">
					<div class="page-title">
						<h1><?php 
        dh_page_title();
        ?>
</h1>
					</div>
					<?php 
        if (dh_get_theme_option('breadcrumb', 1)) {
            ?>
					<div class="page-breadcrumb" itemprop="breadcrumb">
						<?php 
            dh_the_breadcrumb();
            ?>
					</div>
					<?php 
        }
        ?>
				</div>