Stop WordPress Messing with code
-
Hi all
I know that I shouldn’t really have my own code within a post. I know that for every one of my divs that I add I should create a way for content editors to add that div. so PLEASE hear me out before before telling me I’m doing it all wrong (which someone elses post from a few years back degenerated into)
I have a website and I’ve built the HTML in an editor. It’s much easier that way and I was writing / designing on the fly, on a limited budget so could not spend the time planning out adding to the default WP editor features.
This contains code that are basically hooks for CSS to add in call out boxes, pull quotes, columns, change styles etc etc.
What I’d like to be able to do is simply paste that code into the code view of wordpress. Then if the client has a few typos they can change them in the visual view. If they want to move whole sentences around they’d need to call me and I’d do it – otherwise they could delete end and beginning DIVs.
The problem is that whenever I have a DIV, WP enteres an empty P.
Unless I removed all the white space before pasting the code in, is there any way of disabling this. If I disable all <p> then when the client creates posts they would have to add all those by hand.
Perhaps there is a better way of going about it? Or perhaps its a flat “NO” but I’d appreciated any thoughts on this.
Maybe I can use remove_filter (‘the_content’, ‘wpautop’) on pages but have it enabled for posts?
Much appreciated
- The topic ‘Stop WordPress Messing with code’ is closed to new replies.