WPML compatibility
-
Hi,
we have noticed that if you set a category filter and you are using WPML, the news in the languages different from the default one do not show.
This can be solved putting these rows at the beginning of the ticker_get_posts function declaration:
if (function_exists(‘icl_object_id’)) {
$new_cats = array();
foreach ($cat_filter as $cf) {
$id = icl_object_id($cf, ‘category’, false);
$new_cats[] = $id;
}
$cat_filter = $new_cats;
}this way the category check uses the correct category ID for the current language
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WPML compatibility’ is closed to new replies.