Exemple #1
0
<?php

get_header();
$page_id = be_get_page_id();
global $be_themes_data, $blog_attr;
$blog_attr = array();
$items_per_page = get_option('posts_per_page');
$blog_attr['gutter_style'] = !isset($be_themes_data['blog_gutter_style']) || empty($be_themes_data['blog_gutter_style']) ? 'style1' : $be_themes_data['blog_gutter_style'];
$blog_attr['gutter_width'] = !isset($be_themes_data['blog_gutter_width']) || empty($be_themes_data['blog_gutter_width']) ? intval(40) : intval($be_themes_data['blog_gutter_width']);
$blog_attr['pagination_style'] = !isset($be_themes_data['blog_pagination_style']) || empty($be_themes_data['blog_pagination_style']) ? 'normal' : $be_themes_data['blog_pagination_style'];
$blog_attr['style'] = !isset($be_themes_data['blog_style']) || empty($be_themes_data['blog_style']) ? 'style1' : $be_themes_data['blog_style'];
$blog_column = !isset($be_themes_data['blog_column']) || empty($be_themes_data['blog_column']) ? 'three-col' : $be_themes_data['blog_column'];
$sidebar = !isset($be_themes_data['blog_sidebar']) || empty($be_themes_data['blog_sidebar']) ? 'right' : $be_themes_data['blog_sidebar'];
if ($blog_attr['style'] == 'style3') {
    $sidebar = 'no';
    $blog_style_class = $blog_attr['style'] . '-blog portfolio-container clickable clearfix';
} else {
    $blog_style_class = $blog_attr['style'] . '-blog';
}
if ($blog_attr['style'] == 'style3' && $blog_attr['gutter_style'] == 'style2') {
    $portfolio_wrap_style = 'style="margin-left: -' . $blog_attr['gutter_width'] . 'px;"';
    $portfolio_pagination_style = 'style="margin-left: ' . $blog_attr['gutter_width'] . 'px; margin-top: ' . (40 - (intval($blog_attr['gutter_width']) > 40) ? 0 : intval($blog_attr['gutter_width'])) . 'px;"';
} else {
    $portfolio_pagination_style = $portfolio_wrap_style = 'style="margin-left: 0px;"';
}
?>
<section id="blog-content" class="no-sidebar-page">
	<div class="clearfix">
		<?php 
if (isset($be_themes_data['blog_page_show_page_title_module']) && !empty($be_themes_data['blog_page_show_page_title_module']) && $be_themes_data['blog_page_show_page_title_module'] == 1) {
    get_template_part('page-breadcrumb');
Exemple #2
0
<?php

global $be_themes_data;
$post_id = be_get_page_id();
$show_bottom_widgets = get_post_meta($post_id, 'be_themes_bottom_widgets', true);
$show_footer_area = get_post_meta($post_id, 'be_themes_footer_area', true);
if ($show_bottom_widgets != 'no') {
    $show_widgets = true;
} else {
    $show_widgets = false;
}
if (is_home() || is_search() || is_tag() || is_archive() || is_category()) {
    if (isset($be_themes_data['show_bottom_widgets']) && 'yes' == $be_themes_data['show_bottom_widgets']) {
        $show_widgets = true;
    } else {
        $show_widgets = false;
    }
}
$col_class = "one-third";
$i = 3;
$active_sidebar = false;
if ($be_themes_data['bottom_widgets_layout'] == 'four-col') {
    $col_class = "one-fourth";
    $i = 4;
}
for ($j = 1; $j <= $i; $j++) {
    if (is_active_sidebar('footer-widget-' . $j)) {
        $active_sidebar = true;
        break;
    }
}
 function be_themes_add_body_class($classes)
 {
     global $post;
     global $be_themes_data;
     $post_id = be_get_page_id();
     if (is_singular('post') && is_single($post_id) && isset($be_themes_data['single_blog_hero_section_from']) && $be_themes_data['single_blog_hero_section_from'] == 'inherit_option_panel') {
         if (!empty($be_themes_data['single_blog_header_transparent']) && isset($be_themes_data['single_blog_header_transparent']) && $be_themes_data['single_blog_header_transparent']) {
             $header_transparent = $be_themes_data['single_blog_header_transparent'];
             $header_sticky = $be_themes_data['single_blog_header_sticky'];
         } else {
             $header_transparent = 0;
             $header_sticky = 0;
         }
     } else {
         if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins'))) && is_product($post_id) && isset($be_themes_data['single_shop_hero_section_from']) && $be_themes_data['single_shop_hero_section_from'] == 'inherit_option_panel') {
             if (!empty($be_themes_data['single_shop_header_transparent']) && isset($be_themes_data['single_shop_header_transparent']) && $be_themes_data['single_shop_header_transparent']) {
                 $header_transparent = $be_themes_data['single_shop_header_transparent'];
                 $header_sticky = $be_themes_data['single_shop_header_sticky'];
             } else {
                 $header_transparent = 0;
                 $header_sticky = 0;
             }
         } else {
             $header_transparent = get_post_meta($post_id, 'be_themes_header_transparent', true);
             $header_sticky = get_post_meta($post_id, 'be_themes_sticky_header', true);
         }
     }
     if ($header_sticky == 'inherit' || empty($header_sticky)) {
         if (!empty($header_transparent) && isset($header_transparent) && 'none' != $header_transparent) {
             if (isset($be_themes_data['sticky_header']) && 1 == $be_themes_data['sticky_header']) {
                 $classes[] = 'transparent-sticky';
             }
         } else {
             if (isset($be_themes_data['sticky_header']) && 1 == $be_themes_data['sticky_header']) {
                 $classes[] = 'sticky-header';
             }
         }
     } else {
         if ($header_sticky == 'yes') {
             if (!empty($header_transparent) && isset($header_transparent) && 'none' != $header_transparent) {
                 $classes[] = 'transparent-sticky';
             } else {
                 $classes[] = 'sticky-header';
             }
         }
     }
     if ($post_id == 0) {
         if (isset($be_themes_data['sticky_header']) && 1 == $be_themes_data['sticky_header']) {
             $classes[] = 'sticky-header';
         }
     }
     if (!empty($header_transparent) && isset($header_transparent)) {
         if ('transparent' == $header_transparent) {
             $classes[] = 'header-transparent';
         }
         if ('semitransparent' == $header_transparent) {
             $classes[] = 'header-transparent';
             $classes[] = 'semi';
         }
     }
     $section_scroll = get_post_meta($post_id, 'be_themes_section_scroll', true);
     if (!empty($section_scroll) && isset($section_scroll) && $section_scroll) {
         $classes[] = 'section-scroll';
     } else {
         $classes[] = 'no-section-scroll';
     }
     $single_page_version = get_post_meta($post_id, 'be_themes_single_page_version', true);
     if (!empty($single_page_version) && isset($single_page_version) && $single_page_version) {
         $classes[] = 'single-page-version';
     }
     /*if( isset( $be_themes_data['all_ajax'] ) && 1 == $be_themes_data['all_ajax'] )  {
     			$classes[] = 'all-ajax-content';
     		}*/
     // if( isset( $be_themes_data['smooth_scroll'] ) && 1 == $be_themes_data['smooth_scroll'] )  {
     // 	$classes[] = 'smooth-scroll';
     // } else {
     // 	$classes[] = 'no-smooth-scroll';
     // }
     if (isset($be_themes_data['opt-header-type']) && 'left' == $be_themes_data['opt-header-type']) {
         $classes[] = 'left-header';
         if (isset($be_themes_data['left-header-style']) && 'strip' == $be_themes_data['left-header-style']) {
             $classes[] = 'left-sliding';
             $classes[] = 'left-bar-menu';
         } elseif (isset($be_themes_data['left-header-style']) && 'overlay' == $be_themes_data['left-header-style']) {
             $classes[] = 'left-sliding';
             $classes[] = 'left-overlay-menu';
         } else {
             $classes[] = 'left-static';
         }
     } elseif (isset($be_themes_data['opt-header-type']) && 'top' == $be_themes_data['opt-header-type']) {
         $classes[] = 'top-header';
         if (isset($be_themes_data['top-menu-style']) && !empty($be_themes_data['top-menu-style'])) {
             $classes[] = $be_themes_data['top-menu-style'];
         } else {
             $classes[] = 'top-right-sliding-menu';
         }
     }
     if (is_singular('portfolio') || is_page_template('gallery.php') || is_page_template('portfolio.php')) {
         $single_portfolio_style = get_post_meta(get_the_ID(), 'be_themes_portfolio_single_page_style', true);
         if ($single_portfolio_style == 'style1' || $single_portfolio_style == 'style2' || $single_portfolio_style == 'style3' || $single_portfolio_style == 'style4') {
             $classes[] = 'custom-gallery-page';
         }
     }
     if (isset($be_themes_data['all_ajax']) && 1 == $be_themes_data['all_ajax']) {
         $classes[] = 'all-ajax-content';
     }
     if (isset($be_themes_data['layout']) && !empty($be_themes_data['layout'])) {
         $classes[] = 'be-themes-layout-' . $be_themes_data['layout'];
     }
     if (isset($be_themes_data['disable_css_animation_mobile']) && !empty($be_themes_data['disable_css_animation_mobile']) && 1 == $be_themes_data['disable_css_animation_mobile']) {
         $classes[] = 'disable-css-animation-mobile';
     }
     return $classes;
 }