Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $post;
- $featured_cat = get_option('CT_featured_cat');
- $featured_id = get_cat_ID($featured_cat);
- $featured_num = get_option('CT_featured_number');
- $featured_numtext = (get_option('CT_numtext')) ? get_option('CT_numtext') : 30;
- $slideshow_alt = get_option('CT_slideshow_alt');
- $slidetext_position = get_option('CT_slidetext_position');
- if ($slideshow_alt == "true") {
- ?>
- <div id="slider">
- <?php
- $featured_slide = new WP_Query('cat='.$featured_id.'&showposts='.$featured_num);
- while ($featured_slide->have_posts()): $featured_slide->the_post();
- $image_thumbnail = get_post_meta($post->ID, '_image_thumbnail', true );
- ?>
- <?php if ($image_thumbnail) { ?>
- <a href="<?php the_permalink();?>">
- <img src="<?php bloginfo('template_directory');?>/timthumb.php?src=<?php echo $image_thumbnail;?>&h=280&w=960&zc=1" alt="<?php the_title();?>" title="<?php echo excerpt($featured_numtext);?>"/>
- </a>
- <?php
- } else { ?>
- <?php if (get_post_meta($post->ID,"thumbnail",true)) { ?>
- <a href="<?php the_permalink();?>">
- <img src="<?php bloginfo('template_directory');?>/timthumb.php?src=<?php echo get_post_meta($post->ID,"thumbnail",true);?>&h=280&w=960&zc=1" alt="<?php the_title();?>" title="<?php echo excerpt($featured_numtext);?>"/>
- </a>
- <?php } ?>
- <?php } ?>
- <?php endwhile;
- ?>
- </div>
- <?php
- } else { ?>
- <div id="slider1">
- <ul id="slider1Content">
- <?php
- $featured_slide = new WP_Query('cat='.$featured_id.'&showposts='.$featured_num);
- while ($featured_slide->have_posts()): $featured_slide->the_post();
- $image_thumbnail = get_post_meta($post->ID, '_image_thumbnail', true );
- ?>
- <li class="slider1Image">
- <?php if ($image_thumbnail) { ?>
- <a href="<?php the_permalink();?>"><img src="<?php bloginfo('template_directory');?>/timthumb.php?src=<?php echo $image_thumbnail;?>&h=280&w=960&zc=1" alt="<?php the_title(); ?>"/></a>
- <?php
- } else { ?>
- <?php if (get_post_meta($post->ID,"thumbnail",true)) { ?>
- <a href="<?php the_permalink();?>"><img src="<?php bloginfo('template_directory');?>/timthumb.php?src=<?php echo get_post_meta($post->ID,"thumbnail",true);?>&h=280&w=960&zc=1" alt="<?php the_title(); ?>"/></a>
- <?php } else { ?>
- <img src="<?php bloginfo('template_directory');?>/timthumb.php?src=<?php bloginfo('template_directory');?>/images/nothumbnail.jpg&h=280&w=960&zc=1" alt="<?php the_title(); ?>"/>
- <?php }?>
- <?php }?>
- <span
- <?php
- switch ($slidetext_position) {
- case "right": echo 'class="right"';
- break;
- case "left": echo 'class="left"';
- break;
- case "top": echo 'class="top"';
- break;
- case "bottom": echo 'class="bottom"';
- break;
- default: echo 'class="bottom"';
- }
- ?>
- >
- <strong><?php the_title();?></strong>
- <div class="clr"></div><?php if ($slidetext_position == "left" || $slidetext_position == "right") echo '<br />';?>
- <p><?php excerpt($featured_numtext);?></p>
- <div class="clr"></div>
- <?php if ($slidetext_position == "left" || $slidetext_position == "right"): ?>
- <a href="<?php the_permalink();?>" class="more"><?php echo __('read more','centita');?></a>
- <?php endif;?>
- </span>
- </li>
- <?php endwhile;?>
- <?php wp_reset_query();?>
- <div class="clear slider1Image"></div>
- </ul>
- </div>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment