<?php

global $themeple_config;
do_action('themeple_excecute_query_var_action', 'loop-single_portfolio_right');
//$metas = themeple_portfolio_custom_field(get_the_ID());
$metas = themeple_post_meta(get_the_ID());
$output = '';
?>


<?php 
global $themeple_config;
do_action('themeple_excecute_query_var_action', 'loop-single_portfolio_right');
//$metas = themeple_portfolio_custom_field(get_the_ID());
$metas = themeple_post_meta(get_the_ID());
$output = '';
?>


<div class="row-fluid single_content">
    <?php 
if (is_object(get_next_post())) {
    ?>
        <a class="next" href="<?php 
    echo get_permalink(get_next_post()->ID);
    ?>
"><?php 
    _e('Next Post', 'themeple');
    ?>
</a>
    <?php 
Esempio n. 2
0
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;
}
Esempio n. 3
0
    ?>
</h4>
                    
                    <p><?php 
    echo themeple_post_meta(get_the_ID(), 'post_author_desc');
    ?>
</p>
                </dd>
            </dl>
        </div>
        <?php 
}
?>
        
        <?php 
$layout = themeple_post_meta(get_the_ID(), 'layout');
if (!empty($layout)) {
    $l = explode("-", $layout);
    if ($l[0] == 'dynamic_template') {
        $themeple_config['current_view'] = 'page';
        $genDynamic = new GenerateDynamicTemplate($layout);
        $genDynamic->createView();
        echo '<section id="post-single-widget-area">';
        $genDynamic->display();
        echo '</section>';
    }
}
?>
       

 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;
 }
</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 slideshow($element)
 {
     extract($element['saved'][0]);
     $output = '<div class="span' . $dynamic_size . ' dynamic_slideshow">';
     switch ($dynamic_which_post_page) {
         case 'post':
             $query_id = $dynamic_post_id;
             $type = 'post';
             break;
         case 'page':
             $query_id = $dynamic_page_id;
             $type = 'page';
             break;
         case 'self':
             $query_id = $this->post_id;
             $type = get_post_type($this->post_id);
             break;
     }
     $query_post = array('p' => $query_id, 'posts_per_page' => 1, 'post_type' => $type);
     $additional_loop = new WP_Query($query_post);
     if ($additional_loop->have_posts()) {
         while ($additional_loop->have_posts()) {
             $additional_loop->the_post();
             if ($dynamic_which_post_page != 'self' && $query_id != $this->post_id) {
                 global $more;
                 $more = 0;
             }
             if (!$additional_loop->post->post_excerpt || $query_id == $this->post_id) {
                 if (themeple_post_meta(get_the_ID(), '_slideshow_type') != 'layer_slider' || $type == 'post') {
                     $slider = new themeple_slideshow(get_the_ID(), themeple_post_meta(get_the_ID(), '_slideshow_type'));
                     if ($slider) {
                         $sliderHtml = $slider->display();
                         $output .= $sliderHtml;
                     }
                 } else {
                     if (themeple_post_meta(get_the_ID(), '_slideshow_type') == 'layer_slider') {
                         $slider = new themeple_slideshow(get_the_ID(), 'layer_slider');
                         if ($slider) {
                             $slider->options['layer_slider_id'] = themeple_post_meta(get_the_ID(), '_slideshow_layer_slider');
                             ob_start();
                             layerslider($slider->options['layer_slider_id'] + 1);
                             $output .= ob_get_clean();
                         }
                     }
                 }
             }
         }
     }
     $output .= '</div>';
     return $output;
 }
     ?>
 
             	<div class="row filterable">
 
 <?php 
 }
 $the_id = 0;
 $loop_counter = 0;
 if (isset($portfolio_p) && $portfolio_p != '') {
     $used_template_p = themeple_get_option_array('portfolio', 'portfolio_page', $portfolio_p, true);
 }
 while (have_posts()) {
     the_post();
     $loop_counter++;
     $the_id = get_the_ID();
     $metas = themeple_post_meta($the_id);
     $sort_classes = "";
     $item_categories = get_the_terms($the_id, 'portfolio_entries');
     if (is_object($item_categories) || is_array($item_categories)) {
         foreach ($item_categories as $cat) {
             $sort_classes .= $cat->slug . ' ';
         }
     }
     $cats = wp_get_object_terms(get_the_ID(), 'portfolio_entries');
     if (isset($themeple_config['used_for_element']) && !$themeple_config['used_for_element'] || !isset($themeple_config['used_for_element'])) {
         if (!isset($used_template_p)) {
             $used_template = themeple_get_option_array('portfolio', 'portfolio_cats', $cats[0]->term_id, true);
         }
         $portfolio_style = 'v1';
         if (isset($used_template_p)) {
             $used_template = $used_template_p;
                        get_template_part('template_inc/loop', 'single_portfolio_right');
                    }
                }
            }
        }
        ?>
 
                        <?php 
        if (isset($_COOKIE['portfolio_single']) && $_COOKIE['portfolio_single'] != 'wide' || $used_template['portfolio_single_style'] != 'wide' && !isset($_COOKIE['portfolio_single'])) {
            ?>
                        </div>
                        <?php 
        }
        ?>
                         <?php 
        $used = themeple_post_meta($used_template['portfolio_dynamic_page']);
        if (isset($used['layout'])) {
            $genDynamic = new GenerateDynamicTemplate($used['layout']);
            $themeple_config['current_view'] = 'page';
            $genDynamic->createView();
            ?>
                            <section id="portfolio-single-widget-area">
                                
                                    <?php 
            $genDynamic->display();
            ?>
                                
                            </section>   
                        <?php 
        }
        ?>
?>
   
    <?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">
Esempio n. 10
0
    $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 
 /**
  * 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;
 }
Esempio n. 12
0
?>
        <!-- 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 -->
Esempio n. 13
0
    
   
   <?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 {
        if (themeple_post_meta($id, 'header_type') == 'color') {
            $extra_class .= ' colored_bg';
            $extra_style .= ' background:' . themeple_post_meta($id, 'color_pick') . ';';
        }
    }
    if (themeple_post_meta($id, 'page_header_animated') == 'yes') {
        $extra_class .= ' animated_header';
    }
    ?>


   <div class="header_page <?php 
    echo $extra_class;
    ?>
" style="<?php 
    echo $extra_style;
    ?>
">
             <div class="animated_part"></div>
             <div class="container">
                <div class="row-fluid">
 /**
  * themeple_portfolio_custom_field()
  * 
  * @param bool $id
  * @param bool $portfolio_keys
  * @return
  */
 function themeple_portfolio_custom_field($id = false, $portfolio_keys = false)
 {
     if (!$id) {
         $id = get_the_ID();
     }
     if (!$id) {
         return false;
     }
     $output = "";
     $metas = themeple_post_meta($id);
     if (!$portfolio_keys) {
         $portfolio_keys = themeple_get_option('portfolio-meta', array(array('meta' => 'Skills Needed'), array('meta' => 'Client'), array('meta' => 'Project URL')));
     }
     if (empty($metas)) {
         return;
     }
     $p_metas = array();
     foreach ($metas as $key => $meta) {
         if (strpos($key, 'portfolio-meta-') !== false) {
             $newkey = str_replace("portfolio-meta-", "", $key);
             $p_metas[$newkey - 1] = $meta;
         }
     }
     $data = array();
     $counter = 0;
     foreach ($portfolio_keys as $key) {
         if (!empty($p_metas[$counter])) {
             if (themeple_portfolio_url($p_metas[$counter])) {
                 $linktext = $p_metas[$counter];
                 if (strlen($linktext) > 50) {
                     $linktext = "Link";
                 }
                 $p_metas[$counter] = "<a href='" . $p_metas[$counter] . "'>" . $linktext . "</a>";
                 $data[$counter] = array('meta' => "Link", 'value' => $p_metas[$counter]);
             }
             $data[$counter] = array('meta' => $key['meta'], 'value' => $p_metas[$counter]);
         }
         $counter++;
     }
     return $data;
 }
Esempio n. 15
0
<!-- Page Head -->
  <?php 
if (themeple_post_meta(themeple_get_option('blogpage'), 'page_header_bool') == 'yes') {
    $extra_class = '';
    $extra_style = '';
    if (themeple_post_meta(themeple_get_option('blogpage'), 'header_type') == 'image') {
        $extra_style .= 'background-image:url(' . themeple_post_meta(themeple_get_option('blogpage'), '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_option('blogpage'), 'header_type') == 'color') {
            $extra_class .= ' colored_bg';
            $extra_style .= ' background:' . themeple_post_meta(themeple_get_option('blogpage'), 'color_pick') . ';';
        }
    }
    if (themeple_post_meta(themeple_get_option('blogpage'), '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">
Esempio n. 16
0
$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">