• This is driving me absolutely crazy. I’ve removed all plugins aside from wp edit, which i’m using to disable wpautop(). I’ve also tried disabling wpautop() in my functions.php, but it has the same result. I’ve tried 2 different themes. I’m currently using a child-theme based off of hexa.

    I have simplified my problem down to this.

    <div>
    <pre class="inline"><code>git rebase origin/develop</code></pre>
    <span> gets the latest from origin/develop and applies it to your local branch</span></div>

    When I add that to my post editor it all displays correctly assuming I have disabled wpautop() UNTIL I ‘Save Draft’. As soon as I save my draft, it adds <p> tags!

    I’ve tried everything I can think of to prevent it, but nothing is working.

    Any thoughts? Please help.

Viewing 1 replies (of 1 total)
  • Thread Starter thepuzzlemaster

    (@thepuzzlemaster)

    Egg on my face. It was the ‘wp edit’ plugin doing it. God. When I disable that plugin and only use the functions.php to disable wpautop(), it works correctly when saving draft. The visual editor displays it with an added <p> tag, but it doesn’t have it when published. Definitely the lesser of the two evils. Any ideas as to why it would still add a <p> tag in the visual editor when i have this added to my functions.php file?

    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );
Viewing 1 replies (of 1 total)
  • The topic ‘p tags getting added on 'save draft'’ is closed to new replies.