WPML compatibility bug
-
Hello,
I use Cyclone Slider 2 and WPML for internationalization. I translated slides in 4 languages. FR, EN, DE, IT. The main language is French.
Here is my problem : when I’m on the main language homepage, the slider always displays in german instead of french. When I switch to another language, the slide in the correct language is displayed. German is the last translation I did.I investigated and it led me to this function
get_slider_by_slug
which fetch posts.
I saw the argument to fetch only posts in the expected language was not in it.I added
'suppress_filters' => false
So this :$args = array( 'post_type' => 'cycloneslider', 'numberposts' => 1, 'name'=> $slug );
become this :
$args = array( 'post_type' => 'cycloneslider', 'numberposts' => 1, 'name'=> $slug, 'suppress_filters' => false );
And it works. But it’s bad to modify your plugin so I wanted to know if there is an other way, or if there is a possible correction ?
Did this bug affect someone else ? Can you reproduce it ?Thanks a lot for your answer.
Lucile
- The topic ‘WPML compatibility bug’ is closed to new replies.