Resize post image to thumbnail size
-
Hello all,
I am trying to display the most recent post of my Events category on my home page. So far it’s going well, everything is displayed as intended (date, title and content). This is my code:
<?php $recent_events = new WP_Query(); ?> <?php $recent_events->query('cat=4&showposts=1'); ?> <?php global $more; ?> <?php while($recent_events->have_posts()) : $recent_events->the_post(); ?> <li id="events-news"> <p><?php the_date('d/m Y'); ?></p> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php $more = 0; the_content("More..."); ?> </li> <?php endwhile; ?>
Now: I would like to display images as well, which it does at the moment, but my question is, how do I resize the post images to display as (max-width: 50px / max-height:50px) thumbnails?
Thanks in advance!
em
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Resize post image to thumbnail size’ is closed to new replies.