• Resolved silverfactory

    (@silverfactory)


    I’m developing a theme in which I do not use the_content() to show the content but I use parse_blocks() followed by render_block(). For some blocks I need some pre- and post processing. Not for the one showing the contact form.

    I’ve noticed that instead of showing the contact form it keeps showing the shortcodes. When I switch back to the default theme it does show the contact form. So I’m pretty sure it’s render_block() to blame.

    Does anyone know a way to have render_block() rendering the contact form well?

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

    (@silverfactory)

    Okay I kind of fixed it.

    For this particular case, instead of
    render_block($block)

    I could use:

    echo apply_filters( 'the_content', render_block( $block ) );

    This works as long as the contact form is not in a block-column. That was my initial plan but I’ll fix that in CSS.

    • This reply was modified 2 years, 11 months ago by silverfactory. Reason: typo
Viewing 1 replies (of 1 total)
  • The topic ‘Contact form not rendered by render_block() function’ is closed to new replies.