Sorry to bump this old post, but how would you query a page instead of a post?
Use the following for pages:
query_posts(‘page_id=7’); //retrieves page 7 only
Further details on the query_posts() function here:
http://codex.wordpress.org/Template_Tags/query_posts
You can always look up usage and examples in the wordpress codex 🙂
this absolutely does not work for pages and when putting the original listed code in the sidebar, it kills the loop and returns an error for the main content region.
wonder if I could bump this again.
How could I pull this page like this but use an if statement to pull a specific page for each day of the week?
I tried using something like this: http://wordpress.org/support/topic/249486 but I’m doing it wrong. =(
Hey this is just what I needed for my Announcement sidebar — change the post, RSS picks it up, and the sidebar is updated! Perfecto! thanks!