I'm using this code to add a block before the entry title on the front page but its not working:
$e = get_block( '552' );
$eblock = apply_filters( 'the_content', $e->post_content );
echo $eblock;
Note : The code works fine within the content area but not outside the loop.
I also tried do_blocks() but it prints multiple instances of the output which is form HTML.
$get_block = get_post( '552' );
$footer = $get_block->post_content;
$out = do_blocks($footer);
return $title . $out;
Here's where i got the reusable block ID http://example.com/wp-admin/post.php?post=552&action=edit
It must have something to do with add_filter('the_title', i'm using because it works fine when i echo it without a hook.
get_block()
. What is'552'
? What is this code supposed to do?