Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $smof_data;
- $show=get_post_meta($post->ID, 'reedwan_slider_show', TRUE);
- $category=get_post_meta($post->ID, 'reedwan_slider_category', TRUE);
- $number=get_post_meta($post->ID, 'reedwan_slider_count', TRUE);
- $excerpt=get_post_meta($post->ID, 'reedwan_slider_excerpt_length', TRUE);
- $rotate=get_post_meta($post->ID, 'reedwan_slider_rotate', TRUE);
- $show_headline=$smof_data['reedwan_show_headline'];
- ?>
- <div class="row_outer">
- <div class="wpb_row vc_row-fluid">
- <div class="slider-wrap">
- <?php if($show_headline):?>
- <?php get_template_part( 'includes/headline' ); ?>
- <?php endif; ?>
- <?php if(is_page_template('template-homepage.php') && $show && $category!=''):?>
- <div class="home_slider_wrap">
- <div class="home_slider flexslider" data-interval="<?php echo $rotate; ?>" data-flex_fx="fade">
- <ul class="slides">
- <?php
- if ($category == -1) $slider = new WP_Query(array('showposts' => $number,'post_type' => 'post'));
- else $slider = new WP_Query(array('showposts' => $number,'post_type' => 'post', 'cat' => $category));
- while($slider->have_posts()): $slider->the_post();
- $videoURL = get_post_meta(get_the_ID(), 'reedwan_video_url', TRUE);
- if(has_post_format('video') && $videoURL){$video = '<a href="'.$videoURL.'" title="'.__('Play Video', 'realnews').'" class="play-video caption-type"><i class="icon-play-1"></i></a>';}
- else{$video ='';}
- $post_thumbnail = $thumb_size ='';
- $thumb_size = '679x380';
- $post_thumbnail = wpb_getImageBySize(array( 'post_id' => $post->ID, 'thumb_size' => $thumb_size ));
- $thumbnail = $post_thumbnail['thumbnail'];
- ?>
- <li>
- <div class="wpb_row vc_row-fluid">
- <div class="desk">
- <div class="home-slide-caption vc_span5 wpb_column">
- <div class="cal">
- <span class="date"><?php the_time('d') ?></span>
- <span class="year"><?php the_time('Y') ?></span>
- <span class="month"><?php the_time('F') ?></span>
- </div>
- <h1 class="title">
- <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
- </h1>
- <div class="clear"></div>
- <div class="excerpt">
- <p><?php echo string_limit_words(get_the_excerpt(),$excerpt)?></p>
- <span class="readmore"><a href="<?php the_permalink(); ?>">( <?php _e(' Read More','realnews') ?> )</a></span>
- </div>
- </div>
- <div class="home-slide-image vc_span7 wpb_column">
- <?php if(has_post_thumbnail()): ?>
- <a href="<?php the_permalink(); ?>"><?php echo $thumbnail; ?></a>
- <?php endif; ?>
- <?php echo $video; ?>
- </div>
- </div>
- <div class="excerpt mobile">
- <div class="clear"></div>
- <p><?php echo string_limit_words(get_the_excerpt(),$excerpt)?></p>
- <span class="readmore"><a href="<?php the_permalink(); ?>"><?php _e(' read more →','realnews') ?></a></span>
- </div>
- </div>
- </li>
- <?php
- endwhile;
- wp_reset_query();
- ?>
- </ul>
- </div>
- </div>
- <?php endif; ?>
- </div>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement