How get wordpress post content by post id: WordPress

Hello Friends!
If you want to get the post content anywhere in your templates files using post id, then use my code, hope this will be help full to all my friends :)

$post_7 = get_post(7); 
$title = $post_7->post_title; //get the post title
$content = $post_7->post_content; //get post content

Enjoy Raghunath Code!

2 Replies to “How get wordpress post content by post id: WordPress”

  1. TҺe gameplay for dгiving more iոterest aand potenntial clients to your site
    haas changed, aոd linkwheel iis one of the driving forces tto this
    change. Thіs will automaticаlly incrеɑse
    maximum benefits to the client’s businеss aand wikl justify his iոvestment on SEO.
    Each page on your website should bе written for one keyword or one keyword phrase only.

Leave a Reply

Your email address will not be published. Required fields are marked *