Example #1
0
    ?>
				</div>
				
				<?php 
    snpshpwp_get_sidebar('page', 'sidebar-page', $snpshpwp_data['sidebar-size'], '0');
    ?>
				<?php 
    if ($snpshpwp_data['enable_comments'] == 1) {
        comments_template();
    }
    ?>
				<?php 
} else {
    ?>
				<div id="snpshpwp_inner_content" <?php 
    post_class(snpshpwp_get_class('content', 'sidebar-page', $snpshpwp_data['sidebar-size'], $snpshpwp_data['sidebar-page-position']));
    ?>
>
					<?php 
    _e('No posts.', 'snpshpwp');
    ?>
				</div>
				<?php 
}
?>
			</div>
		</div>
		<div class="clearfix"></div>
		<?php 
do_action('snpshpwp_after_content');
?>
Example #2
0
do_action('woocommerce_archive_description');
?>

		<?php 
/**
 * woocommerce_sidebar hook
 *
 * @hooked woocommerce_get_sidebar - 10
 */
if ($snpshpwp_data['sidebar-woo-position'] == 1) {
    snpshpwp_get_sidebar('woo', 'sidebar-woo', $snpshpwp_data['sidebar-woo-size'], '1');
}
?>

		<?php 
printf('<div id="snpshpwp_inner_content" class="%1$s">', snpshpwp_get_class('content', 'sidebar-woo', $snpshpwp_data['sidebar-woo-size'], $snpshpwp_data['sidebar-woo-position']));
?>

		<?php 
if (have_posts()) {
    ?>

			<?php 
    /**
     * woocommerce_before_shop_loop hook
     *
     * @hooked woocommerce_result_count - 20
     * @hooked woocommerce_catalog_ordering - 30
     */
    do_action('woocommerce_before_shop_loop');
    ?>
Example #3
0
        the_post();
        get_template_part('snpshpwp_content');
    }
    ?>
					</div>
				</div>
			<div class="clearfix"></div>
			<?php 
    echo snpshpwp_pagination($wp_query->max_num_pages, $paged, 2, 'no');
    ?>
			</div>
			<?php 
} else {
    ?>
			<div id="snpshpwp_inner_content" class="<?php 
    echo snpshpwp_get_class('content', 'sidebar-blog', $snpshpwp_data['sidebar-size'], $snpshpwp_data['sidebar-blog-position']);
    ?>
">
				<?php 
    printf('<h1 class="snpshpwp_page_title">%1$s</h1><h3>%2$s</h3>', __('NO POSTS FOUND', 'snpshpwp'), __('There are no posts within the search criteria.', 'snpshpwp'));
    ?>
			<div class="clearfix"></div>
			</div>
			<?php 
}
?>
			<?php 
snpshpwp_get_sidebar('blog', 'sidebar-blog', $snpshpwp_data['sidebar-size'], '0');
?>
		</div>
		</div>
Example #4
0
 function snpshpwp_get_sidebar($curr, $curr_sidebar, $curr_width, $curr_position)
 {
     if (is_page() || is_single()) {
         if (get_post_meta(get_the_ID(), 'snpshpwp_sidebar_hide', true) == '1') {
             return;
         }
     }
     global $snpshpwp_data;
     if ($snpshpwp_data[$curr_sidebar] !== '1') {
         return;
     }
     if ($snpshpwp_data[$curr_sidebar . '-position'] !== $curr_position) {
         return;
     }
     $sidebar_class = snpshpwp_get_class('sidebar', $curr_sidebar, $curr_width, $curr_position == '1' ? 'left' : 'right');
     printf('<div class="%1$s">', $sidebar_class);
     if (is_page() || is_single()) {
         $curr_override = get_post_meta(get_the_ID(), 'snpshpwp_sidebar_override', true);
         if ($curr_override !== '' && $curr_override !== 'none') {
             dynamic_sidebar($curr_override);
         } else {
             if ($snpshpwp_data[$curr_sidebar] == '1') {
                 dynamic_sidebar($curr_sidebar);
             }
         }
     } else {
         dynamic_sidebar($curr_sidebar);
     }
     printf('</div>');
 }