• Hi,
    I have a question about the core blocks: Is it possible to render the core blocks via PHP / set their save function to return null? Or would I have to copy the source code and create my own clone block of it??

    Could it work with calling the register_block_type() php function and put in the core block like core/list or whatever? I mean this part is needed anyway, but is it possible with just the php callback setup?

    Thx for help.
    Greets

    • This topic was modified 6 years, 1 month ago by gazanel.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Take a look at all the block functions that are in PHP and see which one you need, because obviously there is no JS when the feed is rendered or when the theme is given the content to output.

    Thread Starter gazanel

    (@gazanel)

    @joyously
    Thx for the reply, but the thing is, I don’t want the final markup to be in the post_content. The core blocks however do exactly that. I can control this via custom blocks. But the question is, if I can modify the existing gutenberg core blocks to not store the markup in the post_content.

    I think if you want the block to behave differently, you have to clone it and change the clone. Since the code for rendering is in JS, if you prevent that, where else will it happen?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Render Core Blocks via PHP’ is closed to new replies.