WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
Filter / display posts by different language on homepage (2 posts)

  1. gombroo
    Member
    Posted 7 months ago #

    My site has 2 languages: English and Polish. On Polish version I'd like to display recent posts written in Polish [http://redscouseworld.com/].
    On English version [http://redscouseworld.com/en] I'd like to show recent posts written only in English.

    I added following code:

    <ul>
    <?php $the_query = new WP_Query( 'showposts=4' ); ?>
    <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
    <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
    <li><?php the_excerpt(__('(moreā€¦)')); ?></li>
    <?php endwhile;?>
    </ul>

    It displays four posts and some text. Could you tell me how to change the code to get what I'm looking for?

    Thanks in advance!

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

  2. gombroo
    Member
    Posted 7 months ago #

    Forgot to mention that when I try to hide untranslated content ALL posts in both languages are being hidden...

Reply

You must log in to post.

About this Plugin

About this Topic