Adding dynamic post to a static homepage on WP

Status
Not open for further replies.

ErioE

New member
Feb 27, 2009
38
0
0
Hey everyone,

I've got a wordpress blog with a custom theme and I currently use a static homepage. I'd like to keep my static homepage, but have my latest post publish on it. I don't want to switch the default option to "latest posts"

I just want 1 post dynamically updating on my static page. Not just list my latest post as a link, but actually display it. Anyone got a little PHP snippet to accomplish this. I found a plugin called "inline posts" that will let me insert a particular post into a page, but not dynamically.

Much appreciated in advance.
 


Thanks...I read through that and have tested a few things, but can't quite get it working right. I've been digging around wordpress all morning and haven't found a good answer. Just thought I'd post here and hopefully save some time.

I basically need to add this somewhere...

<?php query_posts('showposts=1'); ?>

However, if I add to the top of page.php, it overwrites the static homepage with this one post. If I add it to the bottom, it just shows a little bullet point link to 1 post. And if I add it within the loop i'm getting a parsing error.

My PHP chops are pretty weak, if this makes sense to you 1nspire or someone else, please let me know.
 
Status
Not open for further replies.