Problem with get_permalink() + workaround (2 posts)

  1. Lopo
    Posted 5 years ago #

    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.

  2. athanassiadis
    Posted 5 years ago #

    I had the same problem, this worked like a charm! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic