Created
July 17, 2014 15:40
-
-
Save anonymous/5ab1b34509ca69545abc to your computer and use it in GitHub Desktop.
Tint wordpress temos slideris
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header();?> | |
<!------ CONTENT ------> | |
<div class="content left"> | |
<?php | |
$slider_show = get_option('general_enable_slider'); | |
$slider_auto = get_option('general_auto_play'); | |
$slider_speed = get_option('general_slider_delay'); | |
$slider_animation_time = get_option('general_animation_time'); | |
if(empty($slider_speed)) {$slider_speed = "4000";} | |
if(empty($slider_animation_time)) {$slider_animation_time = "1000";} | |
if($slider_show[0] == 'yes') { | |
?> | |
<div class="bg-white left"> | |
<div class="wrapper"> | |
<div class="slider-home left"> | |
<ul id="slider2"> | |
<?php | |
$args=array('post_type' => 'pt_slides' ,'post_status' => 'publish', 'posts_per_page' => 10); | |
query_posts($args); | |
if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
$video_link = get_post_meta($post->ID, 'tk_video_link', true); | |
if($video_link){?> | |
<li> | |
<div class="textSlide left"> | |
<div class="text-img-slider-panel left"> | |
<div class="text-slider-panel-text left"><?php the_content()?></div> | |
</div> | |
<?php tk_video_player($video_link)?> | |
</div> | |
</li> | |
<?php } elseif(has_post_thumbnail()){?> | |
<li> | |
<a href="<?php echo the_permalink()?>" style="display: inline-block;width: 100%;height: 100%;"><?php the_post_thumbnail('slider'); ?></a> | |
</li> | |
<?php }else{?> | |
<li> | |
<div class="textSlide left"> | |
<?php the_content()?> | |
</div> | |
</li> | |
<?php } | |
endwhile; | |
endif; | |
?> | |
</ul> | |
</div><!--/slider-home--> | |
</div><!--/wrapper--> | |
</div><!--/bg-white--> | |
<script type="text/javascript"> | |
jQuery(document).ready(function(){ | |
jQuery('#slider2').anythingSlider({ | |
resizeContents : false, | |
expand : false, | |
startStopped : false, | |
buildArrows : false, | |
buildStartStop : false, | |
delay : <?php echo $slider_speed?>, | |
animationTime : <?php echo $slider_animation_time?>, | |
easing : "easeInOutExpo", | |
autoPlay : <?php if ($slider_auto[0] == 'yes'){echo 'true';}else{echo 'false';}?>, | |
onSlideComplete : function(slider){ | |
}, | |
onSlideBegin: function(e,slider) { | |
// keep the current navigation tab in view | |
slider.navWindow( slider.targetPage ); | |
} | |
}); | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment