Hi there,
I would like to know how I need to put this code from qTranslate:
<?php _e("<!--:en-->For Sale<!--:--><!--:nl-->Te koop<!--:-->"); ?>
into this code:
<?php if( get_field('te_koop') )
{
echo '<span class="sale">Te Koop</span>';
}
else
{
echo '';
}
?>
I’m not quite sure what you want to achieve.
What i can say is, that your if statement needs an expression of the type boolean, which your field probably isn’t. (read this)
Thanks for your respons.
I figured it out, I made another if statement within like this:
<?php
if( get_field('te_koop') )
{
if( qtrans_getLanguage() == 'en' ){
echo '<span class="sale">For sale</span>';
}
else
{
echo '<span class="sale">Te koop</span>';
}
}
else
{
echo '';
}
?>