Title: Get title for specific post
Last modified: August 18, 2016

---

# Get title for specific post

 *  Resolved [lxg](https://wordpress.org/support/users/mastermind/)
 * (@mastermind)
 * [20 years ago](https://wordpress.org/support/topic/get-title-for-specific-post/)
 * I’d like to retrieve the title for a specific post by its ID, just as I can get
   any post’s permalink with `<?php get_permalink(id); ?>`.
 * How could I do this?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [petit](https://wordpress.org/support/users/petit/)
 * (@petit)
 * [20 years ago](https://wordpress.org/support/topic/get-title-for-specific-post/#post-375213)
 * How about
    `<?php $post_id_7 = get_post(7);  $title = $post_id_7->post_title;?
   >
 * Mentioned at [http://codex.wordpress.org/Function_Reference/get_post](http://codex.wordpress.org/Function_Reference/get_post)
 *  Thread Starter [lxg](https://wordpress.org/support/users/mastermind/)
 * (@mastermind)
 * [20 years ago](https://wordpress.org/support/topic/get-title-for-specific-post/#post-375518)
 * Thanks, that’s exactly what I needed.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Get title for specific post’ is closed to new replies.

## Tags

 * [specific](https://wordpress.org/support/topic-tag/specific/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [lxg](https://wordpress.org/support/users/mastermind/)
 * Last activity: [20 years ago](https://wordpress.org/support/topic/get-title-for-specific-post/#post-375518)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
