Show One WordPress Post
There is a great function you might be aware of that allows you to get one WordPress post and display it anywhere you would like (header, sidebar, home page, etc).
To show only one post, use the function get_post.
Example:
post_title; $sdac_content = $show_post_id->post_content; ?> <h2></h2>
The code above will show the title and content of the post with the post ID of 10. If you are not sure what your post ID is, go to the manage screen in the WP-Admin, and hover over the post title. In your browser status bar, you will see the URL – and the post ID is the number at the end of the URL.
I was looking to something like this , but I have adoubt , to add a READ MORE , how can be done thisn??
THnaks!!
Are you looking for the read more to be added when you add in a MORE tag or do you want to hard code it?
Hey Hi.. thanks for the Answer.!
well I eman harecoded , for example :
Adding to the above code the possibility to get the read more if it is one..
is it possible… ?
thanks
Hi
great post!
I was looking for that
however.. I have a question:
I was using contact form 7 plug in and
put it in a post. then.. tried to show the form on
my homepage using your method and for some reason it won’t work.
simple post worked fine but plug in not.
any idea? any addition to the code?
thanks
Thanks Jennifer! So much more succinct and complete than the WordPress codex entry on this function.
Hi!,
I want to show complete post while opening RSS feed of my blog (http://www.cheapmonthlymobile.co.uk/blog/). How can i do that? I already enabled “Full Text” option in reading section, but doesn’t works? Help Me!!!