Title: Problem with Polylang on posts
Last modified: February 25, 2019

---

# Problem with Polylang on posts

 *  [ernest_d](https://wordpress.org/support/users/sfedona/)
 * (@sfedona)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/problem-with-polylang-on-posts/)
 * Post list had problem on my page with Polylang, in default language returned 
   nothing, but on second language showing both languages.
    I modified function 
   to query post as follows
 *     ```
       function sbwpes_sitemap_post() { ?>
   
           <h2><?php _e('Products', 'easy-sitemap' ); ?>:</h2>
   
                       <ul class="sitemap">
   
                       <?php $loop = new WP_Query( array(
   
                               'post_type' => 'post',
   
                               'posts_per_page' => 1000,
   
                               'orderby' => 'title',
   
                               'order'   => 'ASC'
   
                        ) ); ?>
   
                               <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
   
                                       <li><?php the_title( '<a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a>' ); ?></li>
   
                               <?php endwhile; ?>
   
                       </ul>
   
               <?php
   
       }
   
       add_shortcode( 'SitemapPost', 'sbwpes_sitemap_post' );
       ```
   
    -  This topic was modified 7 years, 3 months ago by [ernest_d](https://wordpress.org/support/users/sfedona/).
    -  This topic was modified 7 years, 3 months ago by [ernest_d](https://wordpress.org/support/users/sfedona/).

The topic ‘Problem with Polylang on posts’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sitemap-with-woocommerce.svg)
 * [Sitemap with woocommerce](https://wordpress.org/plugins/sitemap-with-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/sitemap-with-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/sitemap-with-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sitemap-with-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sitemap-with-woocommerce/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [ernest_d](https://wordpress.org/support/users/sfedona/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/problem-with-polylang-on-posts/)
 * Status: not a support question