Title: insert php visual composer integration?
Last modified: February 9, 2018

---

# insert php visual composer integration?

 *  [sambayour](https://wordpress.org/support/users/sambayour/)
 * (@sambayour)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/insert-php-visual-composer-integration/)
 * i am trying to implement a simple user session trick with insert php but it doesn’t
   seem to output html code
 * tried this in a wp text block element
 *     ```
       [insert_php]
       if ( is_user_logged_in() ) {
           echo 'Welcome, registered user!';
       } else {
           echo 'Welcome, visitor!';
       }
   
       [/insert_php]
       ```
   
 * the above code works well
 * but whenever i try to do something like this
 *     ```
       [insert_php]
       if ( is_user_logged_in() ) {
           echo '<h4> welcome</h4>';
       } else {
           echo '<a href=""> login </a>';
       }
   
       [/insert_php]
       ```
   
 * please kindly review the code and please tell me if i miss something, it’s actually
   my first time with wordpress and plugins generally

Viewing 1 replies (of 1 total)

 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/insert-php-visual-composer-integration/#post-9957067)
 * Sambayour, you didn’t tell me what happens when you try the second version. But
   if you’re getting the angle brackets printed on the page, then try using the “
   Text” tab instead of the “Visual” tab when you update the post or page.
 * Also, some people have experienced issues when both the Visual Composer and Insert
   PHP plugins were installed. Seems Visual Composer does unexpected things with
   the code between the insert_php tags. Perhaps that is a clue to what happens 
   when you try the second version.
 * Will
    -  This reply was modified 8 years, 3 months ago by [WillBontrager](https://wordpress.org/support/users/willbontrager/).

Viewing 1 replies (of 1 total)

The topic ‘insert php visual composer integration?’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/insert-php-visual-composer-integration/#post-9957067)
 * Status: not resolved