• My blog, newshackerblog.com, has some old posts with the classic block format. I need to convert to the new block format, however, when I click “convert to blocks,” it renders all my text and images as HTML code instead. Is there any way I can stop this, and just have the converter convert to normal text?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    The convertor piece does the conversion based on what the content of the block is. If the block is complicated or doesn’t fit into any of the normal blocks, then it will convert it to an HTML block. This is to retain the content as much as possible.

    So, to help better, we would need to know what kind of content you have in there. If it’s complex then it might be something you’d need to do more manually than an automated conversion could do.

    Thread Starter newshackerblog

    (@newshackerblog)

    @otto42
    The content is just text and images.

    Classic Block


    Here is an image of what the classic block looks like.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Huh. Look at it in the code mode. Anything special showing up there? If it is just an image and text in a paragraph, that should convert fine, but any additional html code might cause it to convert to an HTML block instead.

    Thread Starter newshackerblog

    (@newshackerblog)

    @otto42
    Nope. Just <div>’s with the text inside each div.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Well, a DIV is enough. It is not going to understand why the DIV is there or retain it if it did a normal conversion. Even the Classic Editor never put a DIV in the content. Anything you made using other editors and methods, well, it’s not going to understand them. WordPress understands things WordPress does.

    Normal posts do not have those types of things in them. That’s custom. That DIV could have classes or IDs or something else that causes styling to happen. So, it will not convert them properly. If it has anything other than basic <P> paragraphs and more or less normal IMGs then yeah, it’s going to convert it to an HTML block.

    Convert it manually. Make the image block, copy the image into it, make the paragraph block, paste the text into it.

    Normal post content is *content*. Text. Images. Not DIVs. Not custom HTML code.

    If it helps, let it convert it into the HTML block, then make normal blocks below it, and copy/paste the content from that block into those normal blocks. Then delete them from the HTML block. Until the HTML block is empty, then delete it.

    The conversion process cannot understand arbitrary data, so it will do its best, however, if there is anything it doesn’t know about, including things added by plugins or by hand, then it will do everything it can to retain that. You have to convert those custom things manually, or find blocks to replace them specifically.

    Also, and this is important, you do not have to convert your content at all. The old content in the database will continue to be output just fine. All the old content handling is still there. It’s not going anywhere. The only reason to convert old content to new blocks form is if you need to edit it. Converting it to blocks doesn’t actually change anything by itself. Old content will continue to be processed and rendered in the same old way it always has, and there are no plans to remove that functionality.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Converting Classic Block to New Blocks’ is closed to new replies.