Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Slideshow

By: a guest on Dec 25th, 2010  |  syntax: None  |  size: 1.98 KB  |  hits: 528  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.     $args = array(
  3.         'meta_key' => 'sgt_slide',
  4.         'meta_value' => 'on',
  5.         'numberposts' => -1,
  6.         );
  7.     $slides = get_posts($args);
  8.  
  9.     if ( !empty($slides) ) : $exl_posts = Array(); ?>
  10.  
  11.         <div class="slideshow"><div id="slideshow">
  12.  
  13.         <?php foreach( $slides as $post ) :
  14.             setup_postdata($post);
  15.             global $exl_posts;
  16.             $exl_posts[] = $post->ID;
  17.         ?>
  18.         <div class="slide clear">
  19.             <div class="post">
  20.            
  21.                 <?php tern_wp_youtube_image(); ?>
  22.                 <?php if ( has_post_thumbnail() ) echo '<a href="'.get_permalink().'">'.get_the_post_thumbnail($post->ID, 'slide',
  23.                     array(
  24.                         'alt'   => trim(strip_tags( $post->post_title )),
  25.                         'title' => trim(strip_tags( $post->post_title )),
  26.                     )).'</a>'; ?>
  27.                 <div class="post-category"><?php the_category(' / '); ?></div>
  28.                 <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  29.  
  30.                 <div class="post-meta">by <span class="post-author"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="Posts by <?php the_author(); ?>"><?php the_author(); ?></a></span> on <span
  31.                         class="post-date"><?php the_time(__('M j, Y')) ?></span> &bull; <?php comments_popup_link(__('No Comments'), __('1 Comment'), __('% Comments'), '', __('Comments Closed') ); ?> <?php edit_post_link( __( 'Edit entry'), '&bull; '); ?></div>
  32.                 <div class="post-content"><?php if ( has_post_thumbnail() && function_exists('smart_excerpt') ) smart_excerpt(get_the_excerpt(), 50); else smart_excerpt(get_the_excerpt(), 150); ?></div>
  33.             </div>
  34.         </div>
  35.         <?php endforeach; ?>
  36.  
  37.         </div>
  38.  
  39.             <a href="javascript: void(0);" id="larr"></a>
  40.             <a href="javascript: void(0);" id="rarr"></a>
  41.         </div>
  42.     <?php endif; ?>