Title: PHP code is printed twice
Last modified: August 22, 2016

---

# PHP code is printed twice

 *  Resolved [Pepozzo](https://wordpress.org/support/users/pepozzo/)
 * (@pepozzo)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-code-is-printed-twice/)
 * Hello!
 * Plugin was working well, but since today, I’m encountering this problem. I’ve
   made some changes in the code, then inserted the code within correct tags in 
   WP text mode and saved. When I visit the page from front-end I can see the code
   correctly rendered, then, if I scroll down the page, I see the original PHP code
   starting from [insert_php] tag.
 * Here’s a screenshot: [http://i.imgur.com/gJLFQ7h.png](http://i.imgur.com/gJLFQ7h.png)
 * I’ve already tried to delete the whole code and re-paste. I’m also writing code
   in Notepad++ then copy&paste it to avoid WordPress replacement.
 * Any suggestion?
 * PS: you can find the entire code here [http://pastebin.com/PnkV2p1g](http://pastebin.com/PnkV2p1g)
 * Thanks!
 * [https://wordpress.org/plugins/insert-php/](https://wordpress.org/plugins/insert-php/)

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

 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-code-is-printed-twice/#post-5233867)
 * Pepozzo, I’m fairly certain it’s the vertical bar characters in the code. At 
   least they’ll need to have a work-around so testing can continue.
 * `if (!isset($q) || $q == '') {`
 * Perhaps this would work for you:
 * `if (!isset($q) or $q == '') {`
 * See [http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#nonworkingelements](http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#nonworkingelements)
   for info.
 * Will
 * P.S. Thanks for the outstanding presentation of screenshot and code.
 *  Thread Starter [Pepozzo](https://wordpress.org/support/users/pepozzo/)
 * (@pepozzo)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-code-is-printed-twice/#post-5233874)
 * Sorry Will, my fault.
 * I didn’t check properly the documentation. I’ve used your suggestion and it work
   very well.
 * Thank you!

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

The topic ‘PHP code is printed twice’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Pepozzo](https://wordpress.org/support/users/pepozzo/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/php-code-is-printed-twice/#post-5233874)
 * Status: resolved