try and change from:
$the_query = new WP_Query('showposts=&orderby=post_date&order=desc');
to:
if( is_category() ) :
$the_query = new WP_Query('showposts=&orderby=post_date&order=desc&cat='.get_query_var('cat'));
else : $the_query = new WP_Query('showposts=&orderby=post_date&order=desc');
endif;
(untested)
Think that’s almost there only its only pulling in one featured image. The latest post.
possibly try to set the ‘showposts’ to whatever number you want to show:
if( is_category() ) :
$the_query = new WP_Query('showposts=9&orderby=post_date&order=desc&cat='.get_query_var('cat'));
else : $the_query = new WP_Query('showposts=9&orderby=post_date&order=desc');
endif;
Still no luck, it seems to be just loading my most rescent post.
Here is a paste bin can you see if I’ve made any errors? I did just copy and paste.
http://pastebin.com/201T76aR
Still have not found a solution to this 🙁
change this section:
<div class="latest-post">
<a href="<?php the_permalink() ?>" rel="bookmark">
<?php the_post_thumbnail('latestvideos'); ?></a>
</div>
to:
<?php if( $the_query->have_posts() ) : while( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div class="latest-post">
<a href="<?php the_permalink() ?>" rel="bookmark">
<?php the_post_thumbnail('latestvideos'); ?></a>
</div>
<?php endwhile; endif; ?>
Magic works perfectly. Thanks alchymth you have some skills!
this is nice . i have one more thing to know
how can i specific category and how can show only thumbnail size.
i want to show specify category post feature images display