• 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 3 years, 1 month ago by laddi.
    • This topic was modified 3 years, 1 month 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 7 replies - 1 through 7 (of 7 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 laddi

    (@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 laddi

    (@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 laddi

    (@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

    Do you use Yoast? Could be related to their “Table of contents” block.

    Nevermind

    • This reply was modified 2 years, 2 months ago by kpmarz.
    • This reply was modified 2 years, 2 months ago by kpmarz.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable id attributes in Heading tag’ is closed to new replies.