Title: get_permalink() problem
Last modified: August 21, 2016

---

# get_permalink() problem

 *  Resolved [Anastis Sourgoutsidis](https://wordpress.org/support/users/anastis/)
 * (@anastis)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/get_permalink-problem/)
 * Hi there,
 * it seems that get_permalink() (called from within a theme) fails to grab translations
   of posts and pages (polylang v1.5.2)
 * E.g.
    ID 10 = English post ID 11 = the associated Greek post
 * While viewing a greek page, `get_permalink(10)` will return the English page’s
   permalink.
    Is this expected behaviour? I couldn’t find any related info, other
   than [this thread](http://wordpress.org/support/topic/translating-links?replies=23)
   where you suggest that _this will work out of the box_. But it doesn’t.
 * Thanks for your time, and kudos for the great plugin!
 * Anastis
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

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

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/get_permalink-problem/#post-5086993)
 * Hi!
 * What you get is what is expected as get_permalink does not translate the post
   id. The solution is in fact in the thread you linked to.
    `get_permalink(pll_get_post(
   10))` will get the translated post in the correct language.
 *  Thread Starter [Anastis Sourgoutsidis](https://wordpress.org/support/users/anastis/)
 * (@anastis)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/get_permalink-problem/#post-5086995)
 * Thank you very much for your response.
    Big fan of your plugin, by the way.
 * Perhaps you’d want to document this behavior, or even better, filter these native
   functions, just like like you mentioned in that thread 🙂
 * Since I’m a theme-builder, I’m trying to create a wrapper around a couple of 
   translation plugins, so I’ll try to filter these functions myself anyway. Let
   me know if you’re open to collaboration, and if yes, I’ll try to pitch in some
   code.
 * Regards,
    Anastis

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

The topic ‘get_permalink() problem’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Anastis Sourgoutsidis](https://wordpress.org/support/users/anastis/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/get_permalink-problem/#post-5086995)
 * Status: resolved