Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Making recent posts widget compatible with multilingual widget WordPress


Hi all,

I have a multi-lingual widget from WPLM. Its very straightforward to translate posts and pages but the problem i'm having is with the recent pots widget. Posts displayed in this widget area (footer, left) don't change when the language selector is changed. I think it's straighforward to fix this but my lack of knowledge of wordpress is preventing me from doing it.

Any ideas? Or can someone do it for me?

Grateful for a quick response.


Let me know if the money i'm offering seems too low for this job.

Answers (2)


Oleg Butuzov answers:

Actualy its compatible. (tested with Version 1.7.9 and wp 3.0)

take look to the screens attached.

Jbyder comments:

Hi Chaps,

Yes it is compatable. The point I probably didn't make very clearly in my original message is that the recent post widget in the bottom left hand corner only pulls in the latest post whatever language that would happen to be in.

So for example if I'm on the english version homepage yet the latest post was the portuguese translation it would show the portuguese article extract in the left of the footer when really it should should the english version.

At the moment you won't see this on the site because i've set my blog to ignore the categories where my translations are because of the problem I've just described

So I'm still short of an answer to solve this problem.

Oleg Butuzov comments:

What i wanted to tell you by posting that this stuff is works with sitepress plugin, that there is some king of overloading system language before bottom widgets works. perhaps you set some where $lang ='en'; in a code... or not you...

i am author of wpml (but not this one), and in my case i ahve replace <strong>lang</strong> variable by custom <strong>wpmllanguage</strong>. why? because some stupid plugins also use same name for this var.

what is wrong you need to discover yourself. i am just pointing you on a right way.

my recomendation.
1) profile your own code.
2) deactiavate other plugins (not site press) and check result. you can activate tham after that one by one - to get the plugin with is overload your var.

cheers, dude!

Jbyder comments:

Oleg thanks.

I'm a novice with wordpress and know about coding. Are you able to take a look if I pass you my login details?

Oleg Butuzov comments:

You can use my advice for free. But this debuging can take more than hour, and my hour rate is bit bigger than 5$. anyway right now i don't have even free hour for this.

Oleg Butuzov comments:

at least second task you can perform yourself. if reason of bug is other plugin you can easy trace.


Maor Barazany answers:

It might be that the widget is not compatible right to multi language.
Instead, you can install the [[LINK href=""]]PHP Exec plugin[[/LINK]], the lets have a PHP widget, to run PHP code.
Then put this in your widget :

$postslist = get_posts('numberposts=3&order=DESC&post_type=post&orderby=date');

foreach ($postslist as $post) :
<li><a href="<?php echo get_permalink(); ?>" rel="bookmark" title="Permalink to: <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>


Of course, in the numberpost=3, you may write any other number for how many posts you want to be listed.

Jbyder comments:

Maor, thanks. please see my comment below...