I would use a call for 3 posts from that category by doing this:
<ul>
<?php $recent = new WP_Query(); ?>
<?php $recent->query('cat=4&showposts=3'); ?>
<?php while($recent->have_posts()) : $recent->the_post(); ?>
<li>
Then grab all the info you want in each column
</li>
<?php endwhile;?>
</ul>
Then I’d style the ul tag with a class and display the list inline.
Is that the best way to do it??
That displays posts only from one category and what about the images?
You’d grab the images where sarahfrantz listed “grab all the info you want in each column”.
things like the_permalink(); wp_thumbnail(); the_title(); etc….
Hi and thanks a lot for your replies,
I have few more questions:
1) The file that i have to update is the template.php …right?
So… until now i wrote that:
i have commented out that:
<?php //echo $this['template']->render('content'); ?>
<ul>
<?php $recent = new WP_Query(); ?>
<?php $recent->query('showposts=3'); ?>
<?php while($recent->have_posts()) : $recent->the_post(); ?>
<li>
<h2><a href="<?the_permalink(); ?>"><?the_title();?></a> </h2>
<?
the_content();
?>
</li>
<?php endwhile;?>
</ul>
2) How to get the category name of each post
3) the wp_thumbnail(); is not working;
thanks again for your help..
My mistake. Use the_post_thumbnail();
http://codex.wordpress.org/Function_Reference/the_post_thumbnail
Also, category is the_category();