-
Notifications
You must be signed in to change notification settings - Fork 0
/
slider.php
executable file
·42 lines (39 loc) · 1.84 KB
/
slider.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php $nslide = get_option('of_slider_number'); ?>
<?php
$slidertype = get_option('of_slider_type');
if ($slidertype==nivoslider) {
?>
<div id="slider" class="nivoSlider" style="width:<?php echo get_option('of_swidth'); ?>px;height:<?php echo get_option('of_sheight'); ?>px;">
<?php $ex = get_catId(get_option('of_slider_category')); ?>
<?php
global $post;
$args = array( 'numberposts' => $nslide, 'category' => $ex );
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post);
?>
<a href="<?php echo get_permalink() ?>"><img src="<?php echo get_template_directory_uri(); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, 'dbt_frontslider', true) ?>&h=<?php echo get_option('of_sheight'); ?>&w=<?php echo get_option('of_swidth'); ?>&zc=1" title="<?php the_excerpt(); ?>" /></a>
<?php endforeach; ?>
</div>
<?php
}
?>
<?php
$slidertype = get_option('of_slider_type');
if ($slidertype==slidejs) {
?>
<div id="slides" style="width:<?php echo get_option('of_swidth'); ?>px;height:<?php echo get_option('of_sheight'); ?>px;">
<div class="slides_container" style="width:<?php echo get_option('of_swidth'); ?>px;height:<?php echo get_option('of_sheight'); ?>px;">
<?php $ex = get_catId(get_option('of_slider_category')); ?>
<?php
global $post;
$args = array( 'numberposts' => $nslide, 'category' => $ex );
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post);
?>
<a href="<?php echo get_permalink() ?>" title="twelve.inch | Flickr - Photo Sharing!" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, 'dbt_frontslider', true) ?>&h=<?php echo get_option('of_sheight'); ?>&w=<?php echo get_option('of_swidth'); ?>&zc=1" alt="Slide 6" /></a>
<?php endforeach; ?>
</div>
</div>
<?php
}
?>