I'm building a theme that uses native and custom ACF blocks.
At the top of my default page.php template, I have the following:
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
?>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header>
<?php the_content(); ?>
If a featured image is uploaded, the page title sits nicely underneath.
However, if no featured image is uploaded and a cover block (for example) is added, the page title obviously sits on top of the block.
Is there a condition I can use that always inserts the page title underneath the first block added if no featured image is uploaded?