Пример #1
0
function zn_woocommerce_before_main_content()
{
    $page_option = zget_option('show_oblique_heder', 'zn_woocommerce_options', false, 'yes');
    $separator_top = zn_get_top_separator(array('show' => $page_option));
    // SHOW THE HEADER
    $css_class = zget_option('woocommerce_header_ustyle', 'zn_woocommerce_options') ? zget_option('woocommerce_header_ustyle', 'zn_woocommerce_options') : '';
    $title = zget_option('woocommerce_title_text', 'zn_woocommerce_options');
    $description = zget_option('woocommerce_description_text', 'zn_woocommerce_options');
    $background = zget_option('woocommerce_header_bkg_img', 'zn_woocommerce_options');
    zn_get_header(array('title' => $title, 'class' => $css_class, 'description' => $description, 'background' => $background));
    // Check to see if the page has a sidebar or not
    $main_class = zn_get_content_class('shop_sidebar');
    $zn_config['sidebar'] = false;
    if (strpos($main_class, 'sidebar_right') !== false || strpos($main_class, 'sidebar_left') !== false) {
        $zn_config['sidebar'] = true;
    }
    $zn_config['size'] = $zn_config['sidebar'] ? 'col-sm-9' : 'col-sm-12';
    $columns = zget_option('shop_columns', 'zn_woocommerce_options', false, '3');
    $icon = zget_option('shop_icon', 'zn_woocommerce_options', false, array('unicode' => 'ue874', 'family' => 'eleganticons'));
    $icon = !empty($icon['family']) ? '<div class="sectionIcon" ' . zn_generate_icon($icon) . '></div>' : '';
    ?>
	<section class="obliqueCut lightSection <?php 
    echo $separator_top['class'];
    ?>
 <?php 
    echo 'zn_shop_columns' . $columns;
    ?>
 paddingBottom200 shop_page">
		<?php 
    echo $separator_top['svg'];
    ?>

		<?php 
    echo $icon;
    ?>
		<div class="container">
			<div class="row">
				<div class="<?php 
    echo $main_class;
    ?>
">
	<?php 
}
Пример #2
0
    function element()
    {
        global $zn_config;
        // Check to see if the page has a sidebar or not
        $category = $this->opt('category') ? $this->opt('category') : '0';
        $posts_per_page = $this->opt('post_per_page') ? $this->opt('post_per_page') : '8';
        $separator_top = $this->opt('show_oblique_top') ? $this->opt('show_oblique_top') : 'yes';
        $main_class = zn_get_content_class('blog_sidebar');
        $icon_opt = $this->opt('icon');
        $icon = !empty($icon_opt['family']) ? '<div class="sectionIcon"><span class="zn_icon_box_icon" ' . zn_generate_icon($icon_opt) . '></span></div>' : '';
        if (strpos($main_class, 'sidebar_right') !== false || strpos($main_class, 'sidebar_left') !== false) {
            $zn_config['sidebar'] = true;
        } else {
            $zn_config['sidebar'] = false;
        }
        // GET BLOG STYLE
        $zn_config['size'] = $zn_config['sidebar'] ? 'col-sm-9' : 'col-sm-12';
        $zn_config['columns'] = '';
        // SHOW OBLIQUE UNDER SUBHEADER ?
        $page_option = zget_option('show_oblique_heder', 'general_options', false, 'yes');
        $separator_top = zn_get_top_separator(array('show' => $separator_top));
        global $query_string, $paged;
        $args = array('posts_per_page' => $posts_per_page, 'category__and' => $category);
        query_posts($args);
        ?>
		<!--Blog section-->
		<section id="sBlog" class="obliqueCut lightSection <?php 
        echo $separator_top['class'];
        ?>
 <?php 
        echo $this->data['uid'];
        ?>
">
			<?php 
        echo $separator_top['svg'];
        ?>

			<?php 
        echo $icon;
        ?>
			<div class="container">

				<!-- START BLOG CONTENT -->
				<div class="row ">

					<!--MAIN COLUMN-->
					<div class="<?php 
        echo $main_class;
        ?>
 blog_latest style3">
						<?php 
        get_template_part('template_helpers/loop', 'index');
        wp_reset_query();
        ?>
					</div>

					<!-- sidebar -->
					<?php 
        get_sidebar();
        ?>

				</div>
			</div>
			<!-- END CONTAINER -->

		</section>
		<!--END Blog section-->
		<?php 
    }
Пример #3
0
<?php

get_header();
// Check to see if the page has a sidebar or not
$main_class = zn_get_content_class('blog_sidebar');
if (strpos($main_class, 'sidebar_right') !== false || strpos($main_class, 'sidebar_left') !== false) {
    $zn_config['sidebar'] = true;
} else {
    $zn_config['sidebar'] = false;
}
// GET BLOG STYLE
$zn_config['size'] = $zn_config['sidebar'] ? 'col-sm-9' : 'col-sm-12';
$zn_config['columns'] = '';
// SUBHEADER
$css_class = zget_option('header_ustyle', 'general_options') ? zget_option('header_ustyle', 'general_options') : '';
$title = zn_archive_title();
$description = false;
zn_get_header(array('title' => $title, 'class' => $css_class, 'description' => $description));
// SHOW OBLIQUE UNDER SUBHEADER ?
$separator_top = zn_get_top_separator();
?>


    <!--Blog section-->
    <section id="search_page" class="obliqueCut lightSection <?php 
echo $separator_top['class'];
?>
 paddingBottom200">
        <?php 
echo $separator_top['svg'];
?>
Пример #4
0
echo $separator_top['class'];
?>
 paddingBottom200">
			<?php 
echo $separator_top['svg'];
?>
			<?php 
echo $page_icon;
?>

			<div class="container">
				<!-- START BLOG CONTENT -->
				<div class="row ">
				<?php 
// Check to see if the page has a sidebar or not
$main_class = zn_get_content_class('page_sidebar');
$zn_config['sidebar'] = false;
if (strpos($main_class, 'sidebar_right') !== false || strpos($main_class, 'sidebar_left') !== false) {
    $zn_config['sidebar'] = true;
}
$zn_config['size'] = $zn_config['sidebar'] ? 'col-sm-9' : 'col-sm-12';
?>
					<!--MAIN COLUMN-->
					<div class="<?php 
echo $main_class;
?>
">
						<?php 
// Start the Loop.
while (have_posts()) {
    the_post();
Пример #5
0
    <!--Blog section-->
    <section id="sBlog" class="obliqueCut lightSection <?php 
echo $separator_top['class'];
?>
 paddingBottom200">
        <?php 
echo $separator_top['svg'];
?>
        
        <div class="sectionIcon zn_icon icon_ribbon_alt"></div>
        <div class="container">
            <!-- START BLOG CONTENT -->
            <div class="row ">
			<?php 
// Check to see if the page has a sidebar or not
$main_class = zn_get_content_class('single_sidebar');
if (strpos($main_class, 'sidebar_right') !== false || strpos($main_class, 'sidebar_left') !== false) {
    $zn_config['sidebar'] = true;
} else {
    $zn_config['sidebar'] = false;
}
$zn_config['size'] = $zn_config['sidebar'] ? 'col-sm-9' : 'col-sm-12';
?>
                <!--MAIN COLUMN-->
                <div class="<?php 
echo $main_class;
?>
 blog_latest style3">
					<?php 
get_template_part('template_helpers/loop', 'index');
?>
Пример #6
0
$layout = 'blog_sidebar';
if (!empty($zn_config['force_sidebar'])) {
    $layout = $zn_config['force_sidebar'];
} else {
    if (is_page() || is_search() || is_404() || is_attachment()) {
        $layout = 'page_sidebar';
    }
    if (is_archive()) {
        $layout = 'archive_sidebar';
    }
    if (is_singular()) {
        $layout = 'single_sidebar';
    }
}
// Get the sidebar position
$sidebar_pos = zn_get_content_class($layout);
$has_sidebar = false;
if (strpos($sidebar_pos, 'sidebar_left') !== false) {
    $has_sidebar = true;
}
if (strpos($sidebar_pos, 'sidebar_right') !== false) {
    $has_sidebar = true;
}
// Return if we do not have a sidebar
if (!$has_sidebar) {
    return;
}
$cols = !empty($zn_page_sidebar) ? '' : 'col-sm-3';
// Show the sidebar already :)
echo '<aside class="' . $cols . ' zn_sidebar">';
if (!empty($zn_page_sidebar)) {