Title: If Else in differents [insert_php] blocks
Last modified: November 24, 2016

---

# If Else in differents [insert_php] blocks

 *  [albertesga](https://wordpress.org/support/users/albertesga/)
 * (@albertesga)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/if-else-in-differents-insert_php-blocks/)
 * Hello
 * I want to insert a php if then. It looks like this:
    [insert_php] if(!is_user_logged_in()){[/
   insert_php]
 * html code
 * [insert_php]
    } [/insert_php]
 * I don’t want that some users has to understand php echo.
 * Do you think that I can do this with this plugin or another one?
 * Thank you very much!

Viewing 1 replies (of 1 total)

 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/if-else-in-differents-insert_php-blocks/#post-8480826)
 * Hi,
 * Unfortunately, Insert PHP code blocks have to be all in one section. Every block
   is parsed separately. See [http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#inandofitself](http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#inandofitself)
 * I don’t personally know of another plugin that would do it the way you want. 
   Sorry.
 * Will

Viewing 1 replies (of 1 total)

The topic ‘If Else in differents [insert_php] blocks’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3475630)
 * [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/)

 * 1 reply
 * 2 participants
 * Last reply from: [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/if-else-in-differents-insert_php-blocks/#post-8480826)
 * Status: not resolved