Oh plus, what I mean by including latest post doesn’t mean the entire post. What I meant is just including the title of the latest post on certain categories.
I’ve found this link: http://wordpress.org/support/topic.php?id=21194 but that didn’t help me much.
You could use something like this (I got it here in the forum somewhere:)
<?php $temp_query = $wp_query; ?>
<?php query_posts('cat=X&showposts=5'); ?>
<?php while (have_posts()) : the_post(); ?>
<h5 id="post-<?php the_ID(); ?>">
<?php the_title(); ?></h5>
<span class="show"><?php the_content(); ?></span>
<?php endwhile; ?>
<?php $wp_query = $temp_query; ?>
just replace the cat=X
part with the ID# of your category; and change the showposts
number to how many posts you want to display…
…and of course edit the id, span etc. – I copied from a sidebar I was testing on my local install.
moshu, that really works! Thanks.
But somehow it seems that I have a problem on making the title “clickable”. Do you know how can I make the title linkable so that everytime a person clicks, it goes right into the appropriate entry?
Thanks
Try replacing <?php the_title(); ?>
with
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
Thanks IanD, I just copied the code from my test site as it was, without thinking what did I modify for my needs…
hey guys, that’s a good solution of course…but what should I put instead of ID# to get the actual category!? the one I’m in at the moment?
hope u understand what I mean, thanks n regards
Andrea