$blog_page = get_option('page_for_posts'); // return: ID der Beitragsseite $image_data = get_the_post_thumbnail_url( $blog_page, 'full' );
HTML:
<div class="hero" style="height: 400px; background-image: url(<?php echo $image_data ;?>)"> </div>
Titel der Beitragsseite ausgeben:
<h1 class="hero-text__h1"><?php echo get_the_title( $blog_page );?></h1>
Bild ausgeben:
<?php $featured = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ); ?> <?php $featured = $featured[0]; ?> <div class="featured-image" style="background-image: url(<?php echo $featured; ?>); height: 400px;"> </div>