Support » Fixing WordPress » “Convert to Blocks” adds CSS class

  • I’m updating a bunch of old posts. When I click on the Classic Block and select “Convert to Blocks”, every one of the newly created Paragraph blocks has “p3” in the “Advanced”->”Additional CSS Class(es)” field. I have no idea what that is (presumably it’s related to some old theme we’re no longer using). But I don’t know how to prevent it from happening, or remove it in bulk. Can someone point me to any clues or tips?

Viewing 1 replies (of 1 total)
  • Thread Starter OsakaWebbie

    (@osakawebbie)

    I’ve learned more. Sometimes the class is “p1” or “p2”, even when the block type is actually a Heading rather than Paragraph.

    And some of the heading blocks have both a class on the heading tag and a <span>, like this:
    <h3 class="p2"><span class="s1">Some text</span></h3>
    Changing it to H2 (which I want) and removing the “p2” class can be done on the block settings on the right, but to get rid of the span, I have to select “Edit as HTML” and manually remove the <span> and </span> tags, and even in my current theme, that affects the appearance – for some reason, my theme sets the color of any span inside a heading to gray, overriding the heading color, so I need to remove the spans. Any idea how to do that more efficiently?

Viewing 1 replies (of 1 total)
  • The topic ‘“Convert to Blocks” adds CSS class’ is closed to new replies.