Displaying custom field/widget with qTranslate?
-
I am building a multilanguage blog, with qTranslate.
My client wants to display custom html in certain pages’ widget area. The html is different in each language.What i want:
On page “Contact”-s sidebar widget:
if lang=EN, <p>this is eng</p>
if lang=EE, <p>this is not eng</p>Now, the following code works when hardcoded into sidebar.php:
<a href="<?php echo qtrans_convertURL('https://www.civen.ee/teenused/'); ?>"><?php _e("[:ee]TEENUSED[:en]SERVICES[:fi]PALVELUT[:ru]УСЛУГИ"); ?></a>
But when i use paste this into a text widget, WP displays nothing.
I have tried Page Sidebars
( https://www.ads-software.com/extend/plugins/page-sidebars/ ) ,Custom Field widget
( https://www.ads-software.com/extend/plugins/custom-field-widget/ ),Widget Logic
( https://www.ads-software.com/extend/plugins/widget-logic/ ), so far not able to display condtitional qtranslate codeHas anyone accomplished this with qTransl?
Any thoughts how to do this?
- The topic ‘Displaying custom field/widget with qTranslate?’ is closed to new replies.