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

  1. gombroo
    Posted 2 years 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:

    <?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;?>

    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!


  2. gombroo
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic