WordPress.org

Ready to get started?Download WordPress

Forums

wpautop JUST WON'T GO AWAY (4 posts)

  1. CarlThompson
    Member
    Posted 1 year ago #

    I'm having MASSIVE issues with this wpautop thing. I have tried EVERYTHING. I just want to to go away....!

    I need to be able to add some complex html into my pages but WP keeps stripping code and adding P's and BR's

    I have tried the 'remove_filter( 'the_content', 'wpautop' );' in the functions file that does not seem to change anything.

    I have tried just about every plugin there is. nothing seems to have any effect.

    I am now using TinyMCE Advanced and that has stopped WP from adding in stupid P and BRs tags around everything but WP is still stripping A tags.

    I just want HTML that is not effected AT ALL by any plugin or WP. Is there a solution to this?

  2. CarlThompson
    Member
    Posted 1 year ago #

    Ok i think i have it.

    1. install Tiny MCE Advance to overwrite WP code editing
    2. install Preserved HTML Editor Markup to turn off the TinyMCE code editing

  3. CarlThompson
    Member
    Posted 1 year ago #

    That worked for a few hours and then BOOM <code style="display: none;"> everywhere throughout my code.

    Is there any solution?

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 1 year ago #

    Generally speaking, WordPress is not designed to allow users to put in arbitrary HTML. Normal people don't do HTML, they do text, paragraphs, etc. The wpautop function is there for them.

    If you need to do custom HTML on a page as a one-off, then you might be better off creating a custom Page Template in your theme and modifying the HTML of the page directly that way. It's easier and less intrusive into the overall system than fiddling with turning off pieces of the WordPress core functionality.

Topic Closed

This topic has been closed to new replies.

About this Topic