Title: Allow PHP
Last modified: December 16, 2017

---

# Allow PHP

 *  Resolved [autox420](https://wordpress.org/support/users/autox420/)
 * (@autox420)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/allow-php/)
 * How can i allow PHP code in the div? I have tryed most php plugins.
    -  This topic was modified 8 years, 7 months ago by [autox420](https://wordpress.org/support/users/autox420/).

Viewing 6 replies - 16 through 21 (of 21 total)

[←](https://wordpress.org/support/topic/allow-php/?output_format=md) [1](https://wordpress.org/support/topic/allow-php/?output_format=md)
2

 *  Plugin Author [PluginlySpeaking](https://wordpress.org/support/users/pluginlyspeaking/)
 * (@pluginlyspeaking)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/allow-php/page/2/#post-9649976)
 * Did you try something like this :
 * [psfd_php]
    if ( 0 != get_current_user_id() ) { $suffix_url = get_the_author_meta(‘
   user_description’, get_current_user_id() ); } else { $suffix_url = ‘Not logged
   in user’; }
 * echo ‘<iframe width=”362″ height=”395″ src=”[http://something.com/&#8217](http://something.com/&#8217);.
   $suffix_url.'” frameborder=”0″></iframe>’;
 * [/psfd_php]
 * I use get_the_author_meta instead of just the_author_meta because you need to
   store the value in a variable, and not just display it.
 * In this example, I think you should modify the “else” of the conditions, because
   it will give you an unreachable URL.
 * Best Regards,
    PluginlySpeaking
 *  Thread Starter [autox420](https://wordpress.org/support/users/autox420/)
 * (@autox420)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/allow-php/page/2/#post-9650318)
 * Thanks for the help but this code complete removes the floating div.
 * Well i dont know you made PHP codes work that was my request but i just cant 
   make it work with what i need.
 * If u can (you dont need to) do you have other ideas of solveing it?
    I will try
   to ask in wordpress forums.
 *  Plugin Author [PluginlySpeaking](https://wordpress.org/support/users/pluginlyspeaking/)
 * (@pluginlyspeaking)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/allow-php/page/2/#post-9650333)
 * On my side, I have the floating div with an empty iframe. The floating div isn’t
   removed.
 * If you used copy/paste, did you check that the quotes aren’t modified ?
 *     ```
       [psfd_php]
       if ( 0 != get_current_user_id() ) {
       $suffix_url = get_the_author_meta( 'user_description', get_current_user_id() );
       } else {
       $suffix_url = 'Not logged in user';
       }
   
       echo '<iframe width="362" height="395" src="http://something.com/'.$suffix_url.'" frameborder="0"></iframe>';
   
       [/psfd_php]
       ```
   
 * Here is a version with code balise, maybe I should have use them earlier.
 * Best Regards,
    PluginlySpeaking
 *  Thread Starter [autox420](https://wordpress.org/support/users/autox420/)
 * (@autox420)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/allow-php/page/2/#post-9650526)
 * Now its working! Thank you so much <3
 *  Plugin Author [PluginlySpeaking](https://wordpress.org/support/users/pluginlyspeaking/)
 * (@pluginlyspeaking)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/allow-php/page/2/#post-9650545)
 * You are welcome.
    Just some advices about this piece of code we added.
 * Be careful with $suffix_url, the variable isn’t initialized and if the user isn’t
   logged, I doubt the URL ending with space will be found.
 * Also be careful in general, there is absolutely no test in the shortcode psfd_php,
   it reads the PHP you put inside and that’s all.
 * Best Regards,
    PluginlySpeaking
 *  Thread Starter [autox420](https://wordpress.org/support/users/autox420/)
 * (@autox420)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/allow-php/page/2/#post-9650611)
 * Yes no problem.
    And yes i will check security etc.
 * Thanks again!

Viewing 6 replies - 16 through 21 (of 21 total)

[←](https://wordpress.org/support/topic/allow-php/?output_format=md) [1](https://wordpress.org/support/topic/allow-php/?output_format=md)
2

The topic ‘Allow PHP’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/floating-div_71757a.svg)
 * [Floating Div](https://wordpress.org/plugins/floating-div/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/floating-div/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/floating-div/)
 * [Active Topics](https://wordpress.org/support/plugin/floating-div/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/floating-div/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/floating-div/reviews/)

 * 21 replies
 * 2 participants
 * Last reply from: [autox420](https://wordpress.org/support/users/autox420/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/allow-php/page/2/#post-9650611)
 * Status: resolved