Multi-language category filter
-
Hi all,
i’ve been using wordpress for a while now.
Suddenly, I noticed a few weeks ago that my filter in my homepage template is no longer working.Depending on the laguage (english, dutch or french – I’m using WPML v 2.0.4.1), I want another category_id being shown on the page. To do this, I have the following in my page template:
$cat = ”;
//English
if (is_page(’11’) ) {
$cat = array(17);
}
//Dutch
elseif ( is_page(’13’) ) {
$cat = array(18);
}
//French
elseif ( is_page(’15’) ) {
$cat = array(19);
} else {
$cat = ”;
}$showposts = -1; // -1 shows all posts
$do_not_show_stickies = 1; // 0 to show stickies
$args=array(
‘category__in’ => $cat,
‘showposts’ => $showposts,
‘caller_get_posts’ => $do_not_show_stickies
);This seems to work ok for English but no longer for Dutch or French.
I’ve not changed anything regarding plugins or anything but on the Dutch and French page I see all of the lasts posts, not just the filtered ID.Strange thing, on another page (where I use a similar ‘filter’), it’s working without a problem.
Anyone any idea? Page to see the difference is http://notpfan.eu (default = english).
The topic ‘Multi-language category filter’ is closed to new replies.