WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
[resolved] (2 posts)

  1. whoopcg
    Member
    Posted 2 years ago #

    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/

  2. whoopcg
    Member
    Posted 2 years ago #

    Was using this plugin forum also and was answered!
    Hope this helps others.

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic