Support » Fixing WordPress » Disable id attributes in Heading tag

  • I don’t know why but WP is automatically adding id attributes to h2 tags. I am not supplying any id or class attribute and I don’t need it. Also, it’s adding type="1" to <ol> tag that’s not needed in my case.

    Please help, how to stop it?

    I need this:

    <h2>Meaning</h2>
    <h2>Origin</h2>

    This is what WP doing with it.

    <h2 id="meaning">Meaning</h2>
    <h2 id="example-sentences">Example Sentences</h2>
    <h2 id="origin">Origin</h2>
    • This topic was modified 4 months, 2 weeks ago by TJ.
    • This topic was modified 4 months, 2 weeks ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Hi there,

    First thing that came to mind was seeing if deactivating all plugins and using a bundled theme like Twenty Twenty One removes that. Odds are it’s one of the two that is causing that.

    Thread Starter TJ

    (@laddi)

    Hi Jose,
    Thanks for the reply.
    But I am not using anything like that.

    I am building a custom theme and there is nothing I’ve done with the the_content().

    Thread Starter TJ

    (@laddi)

    Help!
    Will anybody tell me how to remove this?

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Is that code publicly available? Are you using custom blocks? Those header tags don’t get altered by core themes which is what lead to think theme. I do know some page builder plugins could also hook to that system so that’s the other reason I asked. If you deactivate all plugins does that still get output?

    Thread Starter TJ

    (@laddi)

    Thank you very much for the reply.
    I am not using custom blocks.
    I am using the latest version of WordPress with 2 plugins: Akismet (Disabled) and Wordfence.

    See screenshot here: https://ibb.co/cXSv6T6

    I am giving you the link to the theme (under-construction).

    https://idioms.a2hosted.com/wp-content/themes/express.zip

    Please install it and see if it is also doing the same at your end.

    I would be highly thankful to you.

    Best Regards,
    TJ

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.