• Hi

    is it possible to add php code within the wp admin frontpage area for an textarea. I have the following html:

    
    <br /><br /> <img src="https://my-domain.com/dev/wp-content/uploads/2017/01/Impressum.png" alt="Leagal Disclosure" /></div>

    and want to change the image according to the selected transposh plugin language. Therefore I need to add:

    <?php echo $my_transposh_plugin->target_language?>

    So the result looks like this:

    
    <br /><br /> <img src="https://my-domain.com/dev/wp-content/uploads/2017/01/Impressum<?php echo $my_transposh_plugin->target_language?>.png" alt="Leagal Disclosure" /></div>

    But it does not work. I guess because the php-code is not executed when I add it in the OT frontpage?

    • This topic was modified 6 years, 5 months ago by ppspeed.
Viewing 1 replies (of 1 total)
  • Thread Starter ppspeed

    (@ppspeed)

    Update:

    The other solution would be to use [shortcodes] in the OT frontend in textareas. I have read this post:

    plugin-optiontree-allow-shortcodes-in-textarea

    But if I add the line

    
    <?php echo do_shortcode( $textarea );?>

    at the very top of my footer.php file the [shortcodes] do not work. I have no idea where else I should put this line. Maybe it’s in the wrong place? Can someone tell me where to put this? Or how else I can make [shortcodes] from transposh available in the OT frontend texareas?

    Many thanks.

    • This reply was modified 6 years, 5 months ago by ppspeed.
Viewing 1 replies (of 1 total)
  • The topic ‘PHP code in OT Frontend textarea?’ is closed to new replies.