the website i'm referring to is technibility.com. If you look at it the slider on top is using this piece of code
<?php if(is_home()) { ?>
<div id="ca-container" class="ca-container">
<div class="ca-wrapper">
<?php while (have_posts()): the_post(); ?>
<div class="ca-item ca-item-2">
<div class="ca-item-main">
<?php if (has_post_thumbnail()): ?>
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail(); ?>
</a>
<?php endif; ?>
<h3><a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php } ?>
problem is that if i used
query_posts('showposts=20');
its going to affect the entire site and show me 20 articles in the carousel and the posts on the page. How can i force it to only take affect with the slider?
also is there a way to have the_post_thumbnail() not stretch the image and use 150px height and any width but keeping it under 300px ?
query_posts()
stomps on the whole global $query, so it is better to useWP_Query
orget_posts()
.