slider

Send Snippet To: Save this snippet to Code Collector Pro -- view all maeghan's snippets
language: PHP
license: GPL 2

Code for Snippet:

                
<div id="slider">    
 
    <img class="scrollButtons left" src="<?php bloginfo('template_directory'); ?>/images/leftarrow.png">
 
	<div style="overflow: hidden;" class="scroll">
 
		<div class="scrollContainer">
 
		<?php $s == 0; ?>
		<?php $slider_query = new WP_Query("showposts=10"); ?>
		<?php while ($slider_query->have_posts()) : $slider_query->the_post(); $s++;
			$do_not_duplicate = $post->ID; ?>
 
            <div class="panel" id="panel_<?php echo ($s); ?>">
				<div class="inside">
					<?php if( get_post_meta( $post->ID, "image_value", true ) ) : ?>
					<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php bloginfo( 'template_directory' ); ?>/timthumb.php?src=<?php echo get_post_meta( $post->ID, "image_value", true ); ?>&amp;w=326&amp;h=240&amp;zc=1" alt="<?php the_title(); ?>" class="alignleft"/></a>
					<?php else : ?>
					<img src="<?php bloginfo('template_directory'); ?>/images/slider-sample.jpg" alt="sample slider image" />
					<?php endif; ?>
					<h2 class="center"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title() ?></a></h2>
				</div>
			</div>
 
			<?php endwhile; wp_reset_query(); ?>
 
		</div>
 
		<div id="left-shadow"></div>
		<div id="right-shadow"></div>
 
    </div>
	<img class="scrollButtons right" src="<?php bloginfo('template_directory'); ?>/images/rightarrow.png">
 
</div>
comments powered by Disqus

Info

Tags: SocialMe Wordpress

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 644
Date Added: 2009-03-26 00:32:22
Last Modified: 0000-00-00 00:00:00

Web Analytics