All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

WordPress – Plugins that show recent posts on sidebar?

  • # April 23, 2009 at 10:45 pm

    Are there any plugins that show your recent posts in the sidebar with the image of the post (thumbnail)?

    Thank you

    # April 25, 2009 at 7:54 pm

    I’m not totally sure what you mean by "image of the post (thumbnail)" but I’ll start with the easy part.

    Here’s the code to do the five most recent posts:

    < ?php $postslist = get_posts('numberposts=5&order=DESC&orderby=post_date'); foreach ($postslist as $post) : setup_postdata($post); ?>

  • “>< ?php the_title(); ?>
  • < ?php endforeach; ?>

If your website uses the custom fields to assign an image to a blog post, you should be able to code the image into this loop. I don’t know of any program that will take a screenshot of each post and load them to your website automatically…

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed