Title: Polylang and Wpp
Last modified: August 31, 2016

---

# Polylang and Wpp

 *  [vrrebels](https://wordpress.org/support/users/vrrebels/)
 * (@vrrebels)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/polylang-and-wpp/)
 * I Hector,
 * I have a multilanguage site.
 * To filter my english post is a simple as (php)
 * if(lang = eng)
    “show (posts)” else “show other language post”
 * The problem is where to pu this code to filter post?
 * I mean surely somewhere you query the database to get the post, the problem is
   where…
 * Thank you, I hope you find the time to answer me
 * [https://wordpress.org/plugins/wordpress-popular-posts/](https://wordpress.org/plugins/wordpress-popular-posts/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/polylang-and-wpp/#post-7256482)
 * Hi there!
 * My answer remains the same as expressed [here](https://wordpress.org/support/topic/problem-with-wpml-15?replies=5#post-8219125)
   and [here](https://wordpress.org/support/topic/problem-with-wpml-15?replies=5#post-8219715).
 * There was no need to open a new topic, the issue is the same.
 *  Thread Starter [vrrebels](https://wordpress.org/support/users/vrrebels/)
 * (@vrrebels)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/polylang-and-wpp/#post-7256490)
 *     ```
       /**
       		 * Queries the database and returns the posts (if any met the criteria set by the user).
       		 *
       		 * @since	1.4.0
       		 * @global	object 		$wpdb
       		 * @param	array		Widget instance
       		 * @return	null|array	Array of posts, or null if nothing was found
       		 */
       ```
   
 * Ok I found it and fixed the problem…your answer had to be look at line xxx of
   the file…sometimes it’s more sipmle to do not answer at all…
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/polylang-and-wpp/#post-7256491)
    1.  You might as well share your solution then so others can benefit from it. If
       it’s good, I will implement it of course.
    2. Keep in mind that it has to work not only for Polylang but for WPML as well.
       Otherwise I won’t be able to use it.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Polylang and Wpp’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/polylang-and-wpp/#post-7256491)
 * Status: not resolved