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 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.
- The topic ‘Problem with get_permalink() workaround’ is closed to new replies.