jrelgin
Member
Posted 8 months ago #
Hi All,
I would like to display a message on my site that I will change occasionally. I thought it may be best to do this through a post that I occasionally edit the copy on. I want this message on every page so I plan to put it in my header.php.
I'm not sure what function and parameters to call for this. I've tried:
<?php query_posts('p=5'); ?>
Am I on the right track or is this the wrong way of doing this?
Thanks in advance!
good start;
you will need the loop to output the post:
http://codex.wordpress.org/The_Loop_in_Action
and you will need to reset the query to have everything as it is for the rest of the page:
http://codex.wordpress.org/Function_Reference/wp_reset_query
using 'get_post()' is another possibility:
http://codex.wordpress.org/Function_Reference/get_post
jrelgin
Member
Posted 8 months ago #
Great! Thank you alchymyth. You have definitely put me on the right track.
What I'm trying to figure out now is how to display the post content and not the post title. Any suggestions?
Thank you again
withing your loop... just call the_content, and don't use the_title
jrelgin
Member
Posted 8 months ago #
thank you both—its working perfectly! I'm sure by now you can tell I'm a newb but thanks to people like you two, i'm learning!
Gotta start somewhere, the codex, google, and these forums will be your friend!!