Home › Support › English Support › [Closed] Slider is showing all slides
This topic contains 7 replies, has 3 voices, and was last updated by Gaspar 1 year, 1 month ago. The support staff assigned to this topic is Harshad.
| Author | Posts |
|---|---|
| Author | Posts |
| February 27, 2012 at 8:13 pm #49067 | |
|
Samir |
All slides with both language English and Arabic are displayed in the Page? How can I fix this issue, although I have checked the slider to be translated. |
| February 27, 2012 at 8:23 pm #49071 | |
|
Harshad |
Hello, WPML hooks to WP API functions such as get_posts and others. It filters their results so that they would return only items in the current language. For this to happen, filters must be applied. To tell WordPress that filters are applied, you need to include 'suppress_filters' => false. This Codex pages explains get_posts: As you can see, suppress_filters is true by default. So, in order to get language filtering, you need to specifically set it to false when you make that call. It's impossible for us to provide the complete solution based on this code snip. Check how the arguments for get_posts are assembled and add the 'suppress_filters' => false attribute to them. For example: Thanks, Harshad |
| February 28, 2012 at 2:17 pm #49179 | |
|
Samir |
This is my Code so where I should add the 'suppress_filters' => false, As you see I found many get_post functions, Appreciate your help. <div id="slider" class="nivoSlider"> $custom = get_post_custom($post->ID); <?php if($url!=""){ ?> <?php } ?> |
| February 28, 2012 at 2:21 pm #49181 | |
|
Harshad |
Hello Samir, Add it to query_posts("post_type=slider&posts_per_page=-1&post_status=publish&suppress_filters=false"); Thanks, Harshad |
| February 28, 2012 at 2:34 pm #49185 | |
|
Samir |
http://www.etechwave.com/wordpress/ Please check the website, all slides are displayed although I added the code as you mentioned above. |
| February 28, 2012 at 3:22 pm #49193 | |
|
Harshad |
Hello Samir, Can you please send your wp admin details and the filename where code is present to my email address? I will further investigate on your issue(s). Thanks, Harshad |
| February 29, 2012 at 6:17 pm #49379 | |
|
Samir |
Thanks alot Harshad |
| April 16, 2012 at 12:26 pm #55797 | |
|
Gaspar |
It´s works. I found this code in my site: <?php …then I add this line code ('suppress_filters' => false) <?php I hope that helps a others… THANXS HARSHAD |
The topic ‘[Closed] Slider is showing all slides’ is closed to new replies.