WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
Problem with get_permalink() + workaround (2 posts)

  1. lopo
    Member
    Posted 3 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
    Member
    Posted 3 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

Tags