Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I´ve been dealing with a qtranslate problem (Im using the twentyten theme) and i hope you cna help me, I´ve been searching on forums and sites but to no vail (their solution is for other them called atahualpa).

First of all the loading speed is too slow. The other problem is that I have a static page that for now uses the "Yet Another Related Posts Plugin" plugin because it is the only plugin I found that shows the recent posts list with a featured thumbnail (but I have the problem that it does not break lines for the expert texts) , and then in other pages I use the "NuRelm Get Posts" to get a list of recent post of a certain cathegory (like here http://eltemadehoy.net/?page_id=11 ).

My problem is that in this "NuRelm Get Posts" (besides being unable to use thumbnails) all the titles of the posts that are translated with qtranslate are shown continous VG "Porque al mundo le importa la independencia de Escocia.Why The World Cares About Scotland´s Independence."

So the titles appear in both languages one after the other. I have some content that is translated and some that isn´t but might be in the future. for now I simply leave blank the other untranslated language title, content and excerpt of a post. But those are are translated invariably get a duplicated title.

Help please.

share|improve this question

1 Answer 1

Check the code that is used by NuRelm Get Posts, it's very likely that it outputs the title using something like

echo $post->post_title;

To have the title translated by qTranslate,the plugin must use the standard function of Wordpress, in this case the_title, that is applying the filters that qTranslate use to render the text multilanguage.

Use:

echo apply_filters('the_title',$post->post_title)

instead.

Remember: this must be DONE in the plugin. Contact the author or substitute it and send the patch to the authors.

share|improve this answer
    
Hi. there is code in qtranslate_configuration.php and in –  diana garcia Apr 10 '12 at 21:10
    
Hi, I solved in another way since changing the codethe_titlecode makes the site to crash. Instead of dealing with qtransalte in the Nurelm Get Posts php I changed : code if (isset($fields_classes_list[$i])) { $content = $content . "<span class=\"" . trim($fields_classes_list[$i]) . "\">"; }code For: if (isset($fields_classes_list[$i])) { $content = __($content . "<span class=\"" . trim($fields_classes_list[$i]) . "\">"); } –  diana garcia Apr 12 '12 at 23:20
1  
The addition of the filter in the code works perfectly for me. –  Vince Pettit Nov 6 '12 at 11:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.