Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi @kingchris!

    In which php file should I put the code for the shortcodes to work in the patterns?

    function render_acf_shortcodes_in_blocks( $block_content, $block ) { if ( has_shortcode( $block_content, ‘acf’ ) || has_shortcode( $block_content, ‘acf_field’ ) ) { $block_content = do_shortcode( $block_content ); } return $block_content; } add_filter( ‘render_block’, ‘render_acf_shortcodes_in_blocks’, 10, 2 );

Viewing 1 replies (of 1 total)