Title: Automatically adding  into my php
Last modified: August 21, 2016

---

# Automatically adding into my php

 *  Resolved [wizawuza](https://wordpress.org/support/users/wizawuza/)
 * (@wizawuza)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/automatically-adding-into-my-php/)
 * Great plugin! It’s been working very well for me lately, but I just upgraded 
   to the newest version earlier today, and a problem kept popping up.. in my php
   files for my custom theme, it was adding “<p>” and “</p>” tags around text where
   I was putting in line breaks.
 * By doing so, it was breaking javascript that I had embedded in the php file
 * The php file was written in a proper editor (sublime text), not the WYSIWYG editor,
   so it’s not a problem with that.
 * The moment I disabled the plugin, the error disappeared.
 * Thanks!
 * [https://wordpress.org/plugins/custom-content-shortcode/](https://wordpress.org/plugins/custom-content-shortcode/)

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

 *  Thread Starter [wizawuza](https://wordpress.org/support/users/wizawuza/)
 * (@wizawuza)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/automatically-adding-into-my-php/#post-5057597)
 * Sorry just realized putting “<p>” into the subject title got stripped out, hence
   the confusing subject
 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/automatically-adding-into-my-php/#post-5057600)
 * Hello,
 * In the update to 0.9.5, I moved the _wpautop_ filter to after the shortcodes 
   are processed, which solved an issue with unwanted formatting (`<p>` and `<br
   >`) being generated inside shortcodes.
 * I believe this is the cause of your issue – very strange that it’s adding unwanted
   tags after theme templates. In the latest update (0.9.6) I moved the wpautop 
   filter back to where it was before.
 * Could you tell me if that solves your issue? If so, I will add an option in the
   settings page so people can choose which works best for their setup.
 *  Thread Starter [wizawuza](https://wordpress.org/support/users/wizawuza/)
 * (@wizawuza)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/automatically-adding-into-my-php/#post-5057649)
 * Thanks for the very quick reply.
 * Just upgraded to 0.9.6, and it looks like things are back to normal.
 * I should note, in case this is important to you (or if it’s a mistake on my part!)…
   the PHP file that had incorrect <p> tags via 0.9.5 was called from a shortcode..
 * In other words, on a few pages on my site, I had the shortcode “[do_a_function]”
 * and in my function.php I had some add_shortcode blah blah… which eventually pulled
   from a wc_get_template (via woocommerce) function that gets a php file to display
   on the page. This is the php file that had the incorrect tags. I did the proper
   ob_start/etc calls to buffer it correctly.
 * Thanks again.
 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/automatically-adding-into-my-php/#post-5057751)
 * Interesting.. I was hoping that the change I’d made (moving _wpautop_ to after
   shortcodes) would solve the recurrent issue of unwanted formatting inside the
   loop when using the post editor. But I see that in your situation (displaying
   a php template through a shortcode) the formatting was applied too late.
 * Well, I’m glad it was a simple solution of moving it back.

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

The topic ‘Automatically adding into my php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/automatically-adding-into-my-php/#post-5057751)
 * Status: resolved