/** * GenerateDynamicTemplate::GenerateDynamicTemplate() * * @return */ function GenerateDynamicTemplate($template = false) { global $controller, $post; if ($template != false) { $ar = explode("-", $template); $this->temp_name = $ar[1]; $this->template_type = $template; $this->post_id = themeple_get_post_id(); $this->template_elements = $this->getTemplateElements(); } }
function add_page_header_class($classes = '') { if (themeple_post_meta(themeple_get_post_id(), 'page_header_bool') == 'yes' || themeple_post_meta(themeple_get_option('blogpage'), 'page_header_bool') == 'yes' && is_single() || is_404() || is_search() || is_archive()) { $classes[] = 'page_header_yes'; } return $classes; }
</a></li> </ul> </div> </div> </div> </div> <?php } ?> <section id="content" <?php if (themeple_post_meta(themeple_get_post_id(), 'page_header_bool') == 'no') { echo 'style=""'; } ?> > <div class="container" id="blog"> <div class="row"> <?php if (isset($themeple_config['current_sidebar']) && $themeple_config['current_sidebar'] == 'sidebar_left') { get_sidebar(); } ?> <div class="span<?php echo $spancontent; ?>
function woocommerce_slider() { $posts_per_page = themeple_post_meta(themeple_get_post_id(), 'slides_number'); $args = array('post_type' => 'product', 'posts_per_page' => $posts_per_page, 'orderby' => 'date', 'order' => 'DESC'); $loop = new WP_Query($args); $this->slide_number = 5; global $woocommerce; $items_in_cart = array(); if ($woocommerce->cart->get_cart() && is_array($woocommerce->cart->get_cart())) { foreach ($woocommerce->cart->get_cart() as $cart) { $items_in_cart[] = $cart['product_id']; } } $output = ''; $output .= '<div class="swiper-container swiper-parent swiper_slider" data-slidenr="5">'; $output .= ' <div class="pagination pagination-parent"></div>'; $output .= ' <div class="swiper-wrapper">'; while ($loop->have_posts()) { $loop->the_post(); global $product; $in_array = in_array($product->id, $items_in_cart); $output .= '<div class="swiper-slide woocommerce-slide product ' . ($in_array ? 'product_added_to_cart' : '') . '" style="background-image:url(' . themeple_image_by_id(get_post_thumbnail_id(), "shop_catalog", 'url') . '); background-repeat:no-repeat; -webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;" >'; $output .= '<div class="overlay">'; if ($in_array) { $output .= '<span class="loading_ef"><i class="moon-checkmark"></i></span>'; } else { $output .= '<span class="loading_ef"><i class="icon-spin moon-spinner-2" aria-hidden="true"></i></span>'; } $output .= '<div class="center-bar">'; $output .= '<a href="#" class="link a0 add_to_cart_button button product_type_simple" data-product_id="' . $product->id . '" data-product_sku="' . $product->get_sku() . '" data-animate="zoomIn"><i class="moon-cart"></i></a></a>'; $output .= '<a href="' . get_permalink() . '" class="link a0" data-animate="zoomIn"><i class="moon-list-3"></i></a></a>'; $output .= '<h5>' . get_the_title() . '</h5>'; $output .= '<span class="price">' . $product->get_price_html() . '</span>'; $output .= "</div>"; $output .= '</div>'; $output .= '</div>'; } $output .= ' </div>'; $output .= ' </div>'; $output .= '</div>'; return $output; }
/** * themeple_check_dynamic_template() * * @param bool $id * @param bool $dependency * @return */ function themeple_check_dynamic_template($id = false, $dependency = false) { $result = false; if (!$id) { $id = themeple_get_post_id(); } if (!$id) { return $result; } if ($dependency) { if (themeple_post_meta($id, $dependency[0]) != $dependency[1]) { return false; } } if ($template = themeple_post_meta($id, 'layout')) { if (strpos($template, "dynamic") !== false) { $result = $template; } } return $result; }
?> <?php if (themeple_post_meta(themeple_get_post_id(), 'page_header_bool') == 'yes') { $extra_class = ''; $extra_style = ''; if (themeple_post_meta(themeple_get_post_id(), 'header_type') == 'image') { $extra_style .= 'background-image:url(' . themeple_post_meta(themeple_get_post_id(), 'background_image') . ');background-repeat: no-repeat;-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover; '; $extra_class .= ' background_image'; } else { if (themeple_post_meta(themeple_get_post_id(), 'header_type') == 'color') { $extra_class .= ' colored_bg'; $extra_style .= ' background:' . themeple_post_meta(themeple_get_post_id(), 'color_pick') . ';'; } } if (themeple_post_meta(themeple_get_post_id(), 'page_header_animated') == 'yes') { $extra_class .= ' animated_header'; } ?> <!-- Page Head --> <?php ?> <div class="header_page <?php echo $extra_class; ?> " style="<?php echo $extra_style; ?> "> <div class="animated_part"></div> <div class="container">
$slider = new themeple_slideshow(themeple_get_post_id()); if ($slider && $slider->slide_number > 0 && $slider->slide_type != '') { if ($slider->options['slideshow_layout'] == 'fixed') { $section_ = themeple_post_meta(themeple_get_post_id(), 'section_or_no'); $padding_slide = themeple_post_meta(themeple_get_post_id(), 'padding_slide'); $extra_class = ''; $extra_style = ''; if ($section_ == 'yes') { $extra_class .= ' section_active'; $c_or_bg = themeple_post_meta(themeple_get_post_id(), 'color_or_background'); if ($c_or_bg == 'color') { $color = themeple_post_meta(themeple_get_post_id(), 'sec_color'); $extra_style .= ' background:' . $color . '; '; } else { if ($c_or_bg == 'background') { $bg = themeple_post_meta(themeple_get_post_id(), 'sec_background'); $extra_style .= ' background-image:url(' . $bg . '); background-repeat:no-repeat;-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover; '; } } } if ($padding_slide == 'no') { $extra_class .= ' padding_top_none'; } ?> <span class="slider-img"></span> <section id="slider-fixed" class="slider <?php echo $extra_class; ?> " style="<?php
?> <!-- End Responsive Menu --> </div> <div class="top_wrapper"> <?php if (themeple_post_meta(themeple_get_post_id(), 'page_creative_bool') == 'yes' && themeple_post_meta(themeple_get_post_id(), 'page_header_bool') == 'no') { ?> <!-- CREATIVE HEADER START --> <div class="creative_header"> <div class="container"> <div class="row-fluid"> <div class="span6"><h1><?php echo themeple_post_meta(themeple_get_post_id(), 'page_creative_big'); ?> </h1></div> <div class="span6"><p><?php echo themeple_post_meta(themeple_get_post_id(), 'page_creative_desc'); ?> </p></div> </div> </div> </div> <!-- CREATIVE HEADER END --> <?php } ?> <?php get_template_part('template_inc/sliders_output'); ?> <!-- .header -->
</div> </header> <div class="top_wrapper"> <?php wp_reset_postdata(); if ((is_home() || is_page()) && !is_single()) { $slider = new themeple_slideshow(themeple_get_post_id()); if ($slider && $slider->slide_number > 0 && $slider->slide_type != '') { if ($slider->options['slideshow_layout'] == 'fixed') { ?> <span class="slider-img"></span> <section id="slider-fixed" class="slider"> <div class="container"> <div class="row">
$title = get_the_title(); $page_parents = page_parents(); $subtitle = themeple_post_meta(themeple_get_post_id(), 'page_header_desc'); ?> <?php if (themeple_post_meta(themeple_get_post_id(), 'page_header_bool') == 'yes') { $extra_class = ''; $extra_style = ''; if (themeple_post_meta(themeple_get_post_id(), 'header_type') == 'image') { $extra_style .= 'background:url(' . themeple_post_meta(themeple_get_post_id(), 'background_image') . ') center no-repeat;'; $extra_class .= ' background_image'; } else { if (themeple_post_meta(themeple_get_post_id(), 'header_type') == 'color') { $extra_class .= ' colored_bg'; $extra_style .= ' background:' . themeple_post_meta(themeple_get_post_id(), 'color_pick') . ';'; } } ?> <!-- Page Head --> <?php ?> <div class="header_page <?php echo $extra_class; ?> " style="<?php echo $extra_style; ?> "> <div class="container"> <div class="row-fluid">
/* Template Name: Archive */ global $themeple_config; $themeple_config['multi_entry_page'] = true; $themeple_config['current_sidebar'] = themeple_get_option('blog_sidebar_position'); $spancontent = 12; if ($themeple_config['current_sidebar'] == 'fullsize') { $spancontent = 12; } else { $spancontent = 9; } $themeple_config['current_view'] = 'blog'; get_header(); $subtitle = themeple_post_meta(themeple_get_post_id(), 'page_header_desc'); $title = get_the_title(); $id = themeple_get_option('blogpage'); ?> <!-- Page Head --> <?php if (themeple_post_meta($id, 'page_header_bool') == 'yes') { $extra_class = ''; $extra_style = ''; if (themeple_post_meta($id, 'header_type') == 'image') { $extra_style .= 'background-image:url(' . themeple_post_meta($id, 'background_image') . ');background-repeat: no-repeat;-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover; '; $extra_class .= ' background_image'; } else {