Title: Problems with WPML
Last modified: August 21, 2016

---

# Problems with WPML

 *  [philippkuehn](https://wordpress.org/support/users/philippkuehn/)
 * (@philippkuehn)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/problems-with-wpml-1/)
 * I have problems with WPML and multiple languages. I don’t know how it is supposed
   to work. But THE MOST times, there are only listed the pages, categories etc 
   from my DEFAULT language. But sometimes and I don’t know why, there are listed
   the items from my other languages. I found no system behind that…
 * The problem here is, if that there are listed the items of my default language
   and I open my page in another language the filter do not work. I think it would
   make sense, that the standard item should displayed always . But then the filter
   sometimes not work.
 * I fixed that for me with replacing this:
 *     ```
       $post_id = $wp_query->get_queried_object_id();
       ```
   
 * with this:
 *     ```
       $post_id = $wp_query->get_queried_object_id();
       if (function_exists('icl_object_id')) {
       	global $sitepress;
       	$post_id = icl_object_id($post_id, 'page', TRUE, $sitepress->get_default_language());
       }
       ```
   
 * How should it actually work?
 * [http://wordpress.org/plugins/restrict-widgets/](http://wordpress.org/plugins/restrict-widgets/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/problems-with-wpml-1/#post-4234925)
 * Thank you Phillip,
 * We noticed similar behavior but it was try to find out when it occurs. Your code
   forces displaying elements in default site language and I think it should solve
   the problem – we’ll add in the upcoming release of the plugin.

Viewing 1 replies (of 1 total)

The topic ‘Problems with WPML’ is closed to new replies.

 * ![](https://ps.w.org/restrict-widgets/assets/icon-256x256.png?rev=1018448)
 * [Restrict Widgets](https://wordpress.org/plugins/restrict-widgets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/restrict-widgets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/restrict-widgets/)
 * [Active Topics](https://wordpress.org/support/plugin/restrict-widgets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/restrict-widgets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/restrict-widgets/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [dFactory](https://wordpress.org/support/users/dfactory/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/problems-with-wpml-1/#post-4234925)
 * Status: not resolved