Title: PHP code in OT Frontend textarea?
Last modified: June 5, 2018

---

# PHP code in OT Frontend textarea?

 *  [ppspeed](https://wordpress.org/support/users/ppspeed/)
 * (@ppspeed)
 * [8 years ago](https://wordpress.org/support/topic/php-code-in-ot-frontend-textarea/)
 * 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 8 years ago by [ppspeed](https://wordpress.org/support/users/ppspeed/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [ppspeed](https://wordpress.org/support/users/ppspeed/)
 * (@ppspeed)
 * [8 years ago](https://wordpress.org/support/topic/php-code-in-ot-frontend-textarea/#post-10368848)
 * 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](https://wordpress.org/support/topic/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 8 years ago by [ppspeed](https://wordpress.org/support/users/ppspeed/).

Viewing 1 replies (of 1 total)

The topic ‘PHP code in OT Frontend textarea?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/option-tree_363534.svg)
 * [OptionTree](https://wordpress.org/plugins/option-tree/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/option-tree/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/option-tree/)
 * [Active Topics](https://wordpress.org/support/plugin/option-tree/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/option-tree/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/option-tree/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [ppspeed](https://wordpress.org/support/users/ppspeed/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/php-code-in-ot-frontend-textarea/#post-10368848)
 * Status: not resolved