How to Stop WP from formatting?

by BenQ
2 replies
I'm tired of WP adding breaks and paragraphs and spans -- just basically cluttering up HTML. I've tried a couple plugins that purport to solve the problem, but none seem to work.

How can I keep WP from adding to my html? Thanks.
#formatting #stop
  • Profile picture of the author permaguru
    The best way is to edit your user and mark off the "Disable the visual editor when writing" option. Now your HTML code won't be touched by wordpress.
    {{ DiscussionBoard.errors[3110919].message }}
  • Profile picture of the author SteveJohnson
    There is a filter that is applied to post output called 'wpautop'. Its function is to convert linebreaks in the output to <p> tags. Sometimes it doesn't work so well.

    Add this line to your theme's functions.php file:
    Code:
    remove_filter ('the_content', 'wpautop');
    If it fixes your issues, great, if not, it's easy to remove.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[3113449].message }}

Trending Topics