lazy-blocks
lazy-blocks copied to clipboard
Get post data in admin
Hi,
I need to create a block that shows the title of the post. How can I insert the post title in the block attributes? Thank you
Hi, this code works for me:
<?php global $wp_query; ?>
<h1 class="title"><?php echo get_the_title($wp_query->posts[0]->ID) ?></h1>