Title: PHP Code Breaks Site
Last modified: August 31, 2016

---

# PHP Code Breaks Site

 *  [lutzcreativegroup](https://wordpress.org/support/users/lutzcreativegroup/)
 * (@lutzcreativegroup)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/php-code-breaks-site/)
 * I just finished a site where I used the “Insert PHP Code Snippet” plugin in conjunction
   with the Elegant Themes Theme “Divi” and Advanced Custom Fields. It worked perfectly.
   So, I decided to use it again under the same theme/ACF plugin scenario. But for
   some reason this plugin is breaking the site on the front end AND the backend
   when I put a PHP shortcode into my page.
 * Shortcode is called “[xyz-ips snippet=”phpHomeServices”]” and here is the code
   entered into the PHP plugin:
 *     ```
       if( have_rows('services_leftcolumn') ): ?>
       <ul>
       	<?php while ( have_rows('services_leftcolumn') ) : the_row();?>
       	<li><a href="<?php echo the_sub_field('service_page_link_lc'); ?>"><?php echo the_sub_field('service_name_lc'); ?></a></li>
       	<?php endwhile; ?>
       </ul>
       <?php endif;?>
   
       <?php if( have_rows('services_rightcolumn') ): ?>
       <ul>
           <?php while ( have_rows('services_rightcolumn') ) : the_row();?>
       	<li><a href="<?php echo the_sub_field('service_page_link_rc'); ?>"><?php echo the_sub_field('service_name_rc'); ?></a></li>
           <?php endwhile; ?>
       </ul>
       <?php endif;
       ```
   
 * Even if I change the PHP code to just `echo "Hello";` it breaks.
 * Front End (links should be in the blue box):
    [http://goo.gl/aX8n2q](http://goo.gl/aX8n2q)
 * Back End:
    [http://goo.gl/ZMx8eW](http://goo.gl/ZMx8eW)
 * [https://wordpress.org/plugins/insert-php-code-snippet/](https://wordpress.org/plugins/insert-php-code-snippet/)

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

 *  Thread Starter [lutzcreativegroup](https://wordpress.org/support/users/lutzcreativegroup/)
 * (@lutzcreativegroup)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/php-code-breaks-site/#post-7163270)
 * Anybody? Thoughts on this?
 *  Thread Starter [lutzcreativegroup](https://wordpress.org/support/users/lutzcreativegroup/)
 * (@lutzcreativegroup)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/php-code-breaks-site/#post-7163277)
 * I believe the issue is with the hosting environment. I moved the site to my hosting
   server and the plugin works as it should. Perhaps there is a PHP setting on their
   hosting that needs to change?

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

The topic ‘PHP Code Breaks Site’ is closed to new replies.

 * ![](https://ps.w.org/insert-php-code-snippet/assets/icon-128x128.png?rev=1800967)
 * [Insert PHP Code Snippet](https://wordpress.org/plugins/insert-php-code-snippet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php-code-snippet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php-code-snippet/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php-code-snippet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php-code-snippet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php-code-snippet/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [lutzcreativegroup](https://wordpress.org/support/users/lutzcreativegroup/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/php-code-breaks-site/#post-7163277)
 * Status: not resolved