Title: Get title from permalink
Last modified: August 18, 2016

---

# Get title from permalink

 *  Resolved [vernikr](https://wordpress.org/support/users/vernikr/)
 * (@vernikr)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/get-title-from-permalink/)
 * How can I get post title having its permalink only?

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

 *  [tsguitar](https://wordpress.org/support/users/tsguitar/)
 * (@tsguitar)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/get-title-from-permalink/#post-434082)
 * Did you search anywhere before you posted this question? You’ll get the answers
   much more quickly if you search either something like Google or the [Codex](http://codex.wordpress.org).
 * Having its permalink only?? As opposed to what else? I’m not quite sure what 
   you mean.
 * Here’s how to display the title of a post:
    `<?php the_title(); ?>`
 * Here’s how to display the title of a post with a link to itself:
    `<a href="<?
   php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title();?
   >"><?php the_title(); ?></a>`
 *  Thread Starter [vernikr](https://wordpress.org/support/users/vernikr/)
 * (@vernikr)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/get-title-from-permalink/#post-434097)
 * I want to print the title of page number 1 on the page number 2. I know only 
   the permalink and the ID of page number 1. I expect function like this:
 * `GetTitle($my_permalink)`
 * or
 * `GetTitle($my_ID)`
 * Is there _any_ way to get title of non current page?
 *  [tsguitar](https://wordpress.org/support/users/tsguitar/)
 * (@tsguitar)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/get-title-from-permalink/#post-434101)
 * Yes:
    [http://codex.wordpress.org/Template_Tags/previous_post](http://codex.wordpress.org/Template_Tags/previous_post)
   [http://codex.wordpress.org/Template_Tags/next_post](http://codex.wordpress.org/Template_Tags/next_post)
 *  Thread Starter [vernikr](https://wordpress.org/support/users/vernikr/)
 * (@vernikr)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/get-title-from-permalink/#post-434103)
 * Yes… But how can I get the title of any post (not only previous or next)?
 *  [tsguitar](https://wordpress.org/support/users/tsguitar/)
 * (@tsguitar)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/get-title-from-permalink/#post-434110)
 * Does it need to by dynamic? You can’t just type it out? If you know the ID and
   permalink, you obviously know the title, but that would mean you need to hand
   code it. Hrmm… Let me look around a bit.
 *  Thread Starter [vernikr](https://wordpress.org/support/users/vernikr/)
 * (@vernikr)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/get-title-from-permalink/#post-434111)
 * Yes, it is dynamic and I can’t type it manually.
 * I have a gallery. This gallery consits of sevaral pages (1, 2, 3 …). On each 
   page I want to have 5 links to some posts (link is a gellery item). But I can’t
   write all links on each page manually. Instead of doing so I get the post ID’s
   from some file. This file can contain only ID’s or permalinks and can’t contain
   titles of pages (if it could the would be no problem).
 *  [tsguitar](https://wordpress.org/support/users/tsguitar/)
 * (@tsguitar)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/get-title-from-permalink/#post-434112)
 * Here you go:
    [http://wordpress.org/support/topic/69219?replies=3](http://wordpress.org/support/topic/69219?replies=3)
 * Actually, a quick Google search for “get post title for a specific post wordpress”
   found that as result #1. Did you search before you posted here? You would have
   found the answer much faster.
 *  Thread Starter [vernikr](https://wordpress.org/support/users/vernikr/)
 * (@vernikr)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/get-title-from-permalink/#post-434115)
 * Thanks a lot, tsguitar! Maybe I used search incorrectly.
 *  [tsguitar](https://wordpress.org/support/users/tsguitar/)
 * (@tsguitar)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/get-title-from-permalink/#post-434118)
 * Can you mark this topic “Resolved”? Thanks.

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

The topic ‘Get title from permalink’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 2 participants
 * Last reply from: [tsguitar](https://wordpress.org/support/users/tsguitar/)
 * Last activity: [19 years, 9 months ago](https://wordpress.org/support/topic/get-title-from-permalink/#post-434118)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
