Title: Problem with get_permalink()   workaround
Last modified: August 20, 2016

---

# Problem with get_permalink() workaround

 *  [Enrico Battocchi](https://wordpress.org/support/users/lopo/)
 * (@lopo)
 * [15 years ago](https://wordpress.org/support/topic/problem-with-get_permalink-workaround/)
 * Background: I’m using QTranslate 2.5.1 with WP 3.1.3. The main language is set
   to Italian, English is the alternative language.
 * In my template I have to use get_permalink() instead of the_permalink(). The 
   problem is, even if the language is English, I get the Italian URL.
 * Googling for this problem I got [this useful instructions](http://www.choong.nl/2011/04/10/qtranslate-and-get_permalink/)
   to fix the problem.
    Actually, you don’t have to hack QTranslate code, since 
   you can simply add `add_filter('post_type_link', 'qtrans_convertURL');` to functions.
   php (at least it worked for me).
 * I’m wondering if that line can be added to the plugin in the next version…
 * Thank you for your amazing, useful piece of code.

Viewing 1 replies (of 1 total)

 *  [athanassiadis](https://wordpress.org/support/users/athanassiadis/)
 * (@athanassiadis)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/problem-with-get_permalink-workaround/#post-2125874)
 * I had the same problem, this worked like a charm! Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Problem with get_permalink() workaround’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/qtranslate.svg)
 * [qTranslate](https://wordpress.org/plugins/qtranslate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/qtranslate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/qtranslate/)
 * [Active Topics](https://wordpress.org/support/plugin/qtranslate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/qtranslate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/qtranslate/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [athanassiadis](https://wordpress.org/support/users/athanassiadis/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/problem-with-get_permalink-workaround/#post-2125874)
 * Status: not resolved