WordPress.org

Support

Support » Plugins and Hacks » qTranslate » [Resolved] [Plugin: qTranslate]

[Resolved] [Plugin: qTranslate]

  • Hi there.

    I’m using this code to list all titles, both languages at the same time, and would like to add the permalink to each language. If I use <?php the_permalink() ?> it only returns, obviously, the default language.

    <?php
    remove_filter('the_posts', 'qtrans_postsFilter');
    query_posts('cat=0$posts_per_page=-1'); // query to show all posts independant from what is in the center;
    global $post;
    if (have_posts()) :
       while (have_posts()) :
          the_post();?>
    <?php echo qtrans_use('pt', $post->post_title); ?>
    <?php echo qtrans_use('en', $post->post_title); ?>
    <?php  endwhile;
    endif;
    add_filter('the_posts', 'qtrans_postsFilter');
    wp_reset_query();
    ?>

    http://wordpress.org/extend/plugins/qtranslate/

Viewing 1 replies (of 1 total)
  • Was using this plugin forum also and was answered!
    Hope this helps others.

    Must use
    <?php echo qtrans_convertURL(get_permalink(), 'pt'); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: qTranslate]’ is closed to new replies.
Skip to toolbar