• My client recently changed themes and now all her old posts have broken formatting the code looks like this:

    <!-- wp:paragraph {"style":{"typography":{"fontSize":"18px"}}} -->
    <p style="font-size:18px"><p class="has-montserrat-font-family has-custom-font" style="font-size:18px;font-family:Montserrat">Dummy Text <em>(by the way)</em></p></p>
    <!-- /wp:paragraph -->

    The font size is supposed to be 18px and Montserrat and i’m happy to make that global via the theme settings or CSS but how can we fix these broken blocks? They all say “This block contains unexpected or invalid content.” and ask for attempted recovery.

    Removing <p class="has-montserrat-font-family has-custom-font" style="font-size:18px;font-family:Montserrat">and it’s closing tag fixes it but is there an easy way to bulk do that? I can easily search and replace the <p class="has-montserrat-font-family has-custom-font" style="font-size:18px;font-family:Montserrat"> but the closing </p> tag is more difficult.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • I am not a developer.

    I think you should ask your question in a CSS support community, like on Reddit or somewhere else.

    Moderator jordesign

    (@jordesign)

    Hey @wormeyman that definitely sounds like a strange case. So just to clarify – the invalid block warnings only showed up after the theme change?

    It sounds possible the original theme was doing something strange and may have changed the way that code was stored/saved. Are you able to tell me what the two themes involved were?

    Thread Starter EricJohnsonGuru

    (@wormeyman)

    The previous theme was Soledad.?It’s about 70% of the post published before the theme switch.

    The Current theme is Create an Kadence child theme by restored 316 designs.

    Hi @wormeyman,

    Could you try to test on Twenty Twenty-Three and let me know if works as expected?

    It is only works on a specific theme, it would likely mean conflict.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Broken Paragraphs and heading since changing themes’ is closed to new replies.