How to prevent wordpress from messing up with your rich editing tags
August 30, 2008 by admin · 6 Comments
function myautop ($text) { return $text; }
function mytext ($text) { return $text; }
remove_filter ('the_content', 'wpautop');
add_filter ('the_content', 'myautop');
remove_filter ('the_content', 'wptexturize');
add_filter ('the_content', 'mytext');
You may download actual plugin from the link below. Just unzip, copy it into ./plugins directory, activate and enjoy.
Note: to fix another big annoyance with WordPress eliminating line breaks - this is what I use to "create" line breaks that WordPress doesn't kill. In HTML mode insert this code:
<div style="margin:2em;"><span style="display:none;">-</span></div>Advantage of this method is that you can regulate size of your "custom line break" by changing value in "margin" CSS tag. Bonus TIP: Actually I just found a better way to keep linebreaks: Advanced TinyMCE plugin seems to add lot more features to TinyMCE editor as well as has an option to stop WordPress's messing up with line breaks.
Download: WP-AllowTags Wordpress Plugin that allows inserting tags


