Support » Plugins » qTranslate shows default url in related posts

  • I’m using qTranslate plugin, default language is Turkish, and other language is English. For example, Turkish site is in and English side is in Everything is ok with qTranslate, but in Related Post i have a weird problem.

    My Related Posts code is as you see;

    <!-- Related Posts-->
    $backup = $post;
    $tags = wp_get_post_tags($post->ID);
    if ($tags) {
    $tag_ids = array();
    foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
    'tag__in' => $tag_ids,
    'post__not_in' => array($post->ID),
    'showposts'=>4, // Number of related posts that will be shown.
    $my_query = new wp_query($args);
    if( $my_query->have_posts() ) {
    //echo '<h2>Benzer Yazılar</h2><ul class="relatedPosts">';
    _e('[:tr]<h2>Benzer Yazılar</h2><ul class="relatedPosts">[:en]<h2>Related Posts</h2><ul class="relatedPosts">');
    while ($my_query->have_posts()) {
    <li><?php the_post_thumbnail(array(40,40)); ?><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
    echo '</ul>';
    $post = $backup;
    <!-- end Related Posts-->

    With this code, if you in English side, All related posts’ URL starts, but some articles in Turkish language which must be start with In reverse, when you are in Turkish side, All related posts shows url in Turkish url format so, but some related post’s url is english.

    How can i handle this problem.

  • The topic ‘qTranslate shows default url in related posts’ is closed to new replies.