• Why does WP constantly change code?

    We just migrated a site and looking at the pages, I can see all my links have lost their format on a large number of pages. Viewing the source shows <p> tags around everything, though they’re not there when I edit the page from within WP. Still, regardless of the <p> tags, ALL my links are now unformatted.

    Example:

    <a class="question" name="1"><h4>&nbsp;</h4></a>

    is now:

    <a class="question" name="1"></a>
    <h4></h4>
    <a class="question" name="1"></a>
    
    &nbsp;

    and:

    <a class="faq" name="2">Why is distance learning so popular?</a>

    has been changed to:

    <a class="faq" name="2"></a>Why is distance learning so popular?

    I have a plug-in that is supposed to stop WP from changing code, but apparently it’s not working. I literally have hundreds of these to fix now.

    Does anybody have any knowledge about why this is happening and how to prevent it?

Viewing 1 replies (of 1 total)
  • Moderator James Huff

    (@macmanx)

    Yeah, WordPress shouldn’t be doing that, and I can’t reproduce the issue on my test installation, which leads me to believe that something else is interfering.

    Try deactivating all plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the Twenty Fifteen theme to rule-out a theme-specific issue (theme functions can interfere like plugins).

    Also, try upgrading to WordPress 4.1. It’s slim that will be the fix, but my test installation is 4.1 with no problems.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress hates nice code’ is closed to new replies.