Help us out here and at least point to the plugin.
I’m sorry about that 🙂 here’s the link:
http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/
If we can make another option for the admin to choose which category to be shown on the site instead of showing all categories would be cool eh?
Shouldn’t this work too? Even without a plugin..
<?php
$posts = get_posts('numberposts=5&order=DESC&orderby=post_date&category=1');
foreach ($posts as $post) : start_wp(); ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php the_content(); ?>
<?php endforeach; ?>
Just replace numberposts with the number of recent posts you want shown, and the category # to your desired category.
I would change:
$posts =
to something else, say:
$sideposts =
to avoid conflicting with the default $posts object (and change foreach ($posts as $post)
to foreach ($sideposts as $post)
). But Licorne’s solution will work — without having to perform a rewrite of that plugin!
Warning: Invalid argument supplied for foreach()
“Warning: Invalid argument supplied for foreach()“
Terse. Impossible to troubleshoot without eyeballing the code. Post the source here:
http://wordpress.pastebin.ca
And reply back with the url to it.
Licorne;
your code works great but everything that comes after it isn’t displayed?
(being used on: http://www.reticular.info/interboro/ )