Title: issue with get_permalink
Last modified: August 19, 2016

---

# issue with get_permalink

 *  [ajaswa](https://wordpress.org/support/users/ajaswa/)
 * (@ajaswa)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/issue-with-get_permalink-1/)
 * OK here’s the setup:
 * I have a single page set to the home page. No posts.
    I have this page using 
   a custom template.
 * The permalink that is returned for this page is the domain (ie. [http://example.com](http://example.com)).
   According to the documentation I should be able to use get_permalink(id) to return
   the permalink for the given page/post via the id. It is my understanding that
   the permalink is what you have set in the page/post editor (ie. [http://example.com/pages/page-1](http://example.com/pages/page-1)).
 * So why is it not returning the correct(?) permalink?
 * Any thoughts on how to get the correct one?

The topic ‘issue with get_permalink’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [ajaswa](https://wordpress.org/support/users/ajaswa/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/issue-with-get_permalink-1/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
