views:

10

answers:

1

Hi there,

I have a site currently built on Wordpress. I have a requirement to pull out the "latest post" in a category (magazine issue), to allow the latest issue to be displayed in the sidebar of a Posterous blog template, either in an iframe or by other means.

What's the best way to achieve this? Shall I write a custom PHP page which queries the database directly to output the results that I want, and then display it in an iframe on the Posterous template? Or is there an easier way to achieve this?

A: 

You could register a widget to the sidebar or simply add code the sidebar.php directly. In the end, all you are doing is building a WP Query for the latest post in a category.

Jason McCreary
Thanks Jason - I've not worked with registered widgets before. Will I be able to use this widget in a Posterous (www.posterous.com) blog's template, which is essentially what I need to do?
pingu