if (is_object(get_previous_post())) {
    ?>
        <a class="prev" href="<?php 
    echo get_permalink(get_previous_post()->ID);
    ?>
"><?php 
    _e('Previous Post', 'themeple');
    ?>
</a>
    <?php 
}
?>
    <div class="row-fluid"   style="margin-top:80px;">
            <div class="span8 slider_full">
            <?php 
$slider = new themeple_slideshow(get_the_ID(), 'flexslider');
if ($slider && $slider->slide_number > 0) {
    $slider->img_size = 'portfolio_side';
    $sliderHtml = $slider->render_slideshow();
    echo $sliderHtml;
}
?>
            </div>
            <div class="span4">
                <div class="row-fluid row-dynamic-el">
                    <div class="span12 about_project">
                        <h5><?php 
_e("About Project", 'themeple');
?>
</h5><p class="content"><?php 
echo get_the_content();
 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;
 }
Ejemplo n.º 3
0
 function widget($atts, $instance)
 {
     extract($atts, EXTR_SKIP);
     echo $before_widget;
     $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
     $post = empty($instance['post']) ? '' : $instance['post'];
     $page = empty($instance['page']) ? '' : $instance['page'];
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     $the_id = 0;
     $the_id = $page;
     $the_id = $post != 0 ? $post : $page;
     $slider = new themeple_slideshow($the_id, 'flexslider');
     if ($slider && $slider->slide_number > 0) {
         $sliderHtml = $slider->render_slideshow();
         echo $sliderHtml;
     }
     echo $after_widget;
 }
Ejemplo n.º 4
0
    <?php 
//Slider
$big_title_bool = themeple_post_meta(themeple_get_post_id(), 'big_title_bool');
if ($big_title_bool == 'yes') {
    ?>
                        <div class="container"><h1 class="big_title_top"><?php 
    echo themeple_post_meta(themeple_get_post_id(), 'big_title');
    ?>
</h1></div>
                        <?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') {
            $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; ';
                    }