WP change slider to display Pages rather than Posts
here's the code :
<div id="slider">
<div id="mover">
<?php
$glidecat = get_option('zm_gldcat');
$glidecount = get_option('zm_gldct');
$my_query = new WP_Query('category_name= '. $glidecat .'&showposts= '. $glidecount . '');
while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
?>
<div class="slide">
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<span class="slmet"> Posted by <?php the_author(); ?> On <?php the_time('F - j - Y'); ?> </span>
<p><?php the_excerpt(); ?></p>
<?php $gallery = get_post_meta($post->ID, 'gallery', $single = true); ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $gallery; ?>&h=120&w=250&zc=1" alt=""/> </a>
</div>
<?php endwhile; ?>
</div>
</div>
I'm sure others would appreciate how to change this from pulling and displaying posts to displaying pages.. would be much more versatile..
Thanks in advance for your time..
-
rufaswan -
Thanks
{{ DiscussionBoard.errors[1575843].message }} -