Title: &#8220;PHP code snippets&#8221; inside other
Last modified: July 2, 2018

---

# “PHP code snippets” inside other

 *  [vkosta](https://wordpress.org/support/users/vitorkosta/)
 * (@vitorkosta)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-code-snippets-inside-other/)
 * Hi
    First, thumbs up for you work! I used insert_php since about a year and half.
   since I began this project on my work.
 * I am trying to convert all my code, but my first attempt I am getting crazy with
   it… it a bad start to me 🙁
 * I have a snippet that displays only when user is logged in. In this case it works
   with old style:
 * `[loggedin]Welcome [insert_php] echo get_currentuserinfo()->display_name;[/insert_php][/
   loggenin]`
 * converting in a snippet, just displays the snipped code like ex: “[wbcr_php_snippet
   id=”416”
 * ?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * (@webcraftic)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-code-snippets-inside-other/#post-10459945)
 * Hi,
    Use this code in the snippet and paste it through the shortcode!
 * `echo do_shortcode('[loggedin]Welcome '.get_currentuserinfo()->display_name.'[/
   loggenin]');`
 * Best regards, Alex
 *  Thread Starter [vkosta](https://wordpress.org/support/users/vitorkosta/)
 * (@vitorkosta)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-code-snippets-inside-other/#post-10464958)
 * ohh… ok.
    but this means to me to move the page content to snippet, it will work,
   but for me at this point it will be not so easy manageable if I need to update
   text content :-/ for example. because I have more complex content were I have
   inside text [loggedin] [loggedout] shortcode to show or not, and with [PHP] with[
   insert_php] is more easy readable, but there are always to faces on a coin 🙂
 * thans anyway
 *  Plugin Author [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * (@webcraftic)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-code-snippets-inside-other/#post-10469725)
 * Hi,
 * You can named to the snippet as you understand it. I do not see cases where the
   problem would be difficult to solve.
 * Can you show me what kind of content you have and what is the difficulty of placing
   snippets in it?
 * My email: [wordpress.webraftic@gmail.com](https://wordpress.org/support/topic/php-code-snippets-inside-other/wordpress.webraftic@gmail.com?output_format=md)
 * Best regards, Alex

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘“PHP code snippets” inside other’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3523853)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/php-code-snippets-inside-other/#post-10469725)
 * Status: not resolved