How can I display instagram block with parse_block?

Question

I have a big problem. I wrote this code:

$blocks = parse_blocks( $post->post_content );

foreach ( $blocks as $block ) {
  if( $block['blockName'] != '' ) {
     $blocks_2[] .= render_block( $block );
  }
}
$num_blocks = cont($blocks_2);

for ($i = 2; $i <= $num_blocks; $i++) {
  echo $blocks_2[$i];
}

Everything is great, but it doesn’t display my code blocks (instagram, twitter) in embed format, just as a url.

Can someone help me?

0
user2986284 4 months 2020-12-17T10:10:31-05:00 0 Answers 6 views 0

Leave an answer

Browse
Browse