WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to display post details by ID on front page template (front-page.php).

On the front page I want to display the post’s title, excerpt & featured image. I have tried to do that but no idea on how I should be doing that.

Is there any function in WordPress that can be used to do it?

share|improve this question
Please show us your code and what you've tried so far. – kaiser Oct 25 '12 at 13:22
up vote 4 down vote accepted

You can use get_post for that


$post = get_post($id); //assuming $id has been initialized

// display the post here

share|improve this answer
hey thanks, that worked very well. – Krunal Oct 25 '12 at 14:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.