content-featured-img.php 889 B

1234567891011121314151617181920212223242526272829303132
  1. <div class="site-banner-content banner-custom-header">
  2. <?php
  3. /**
  4. * Media
  5. */
  6. ?>
  7. <div class="site-banner-media">
  8. <?php $thumb = dyad_2_get_attachment_image_src( $post->ID, get_post_thumbnail_id( $post->ID ), 'dyad-2-banner' ); ?>
  9. <div class="site-banner-thumbnail" title="<?php the_title_attribute(); ?>" <?php if ( dyad_2_has_post_thumbnail() ) { echo 'style="background-image: url(' . esc_url( $thumb ) . ');"'; } ?>></div>
  10. </div>
  11. <?php
  12. /**
  13. * Custom Header text
  14. */
  15. $description = get_bloginfo( 'description', 'display' );
  16. if( 'image' != get_post_format() && ( '' != $description || is_customize_preview() ) ) { ?>
  17. <div class="site-banner-header banner-description">
  18. <h1 class="entry-title site-description">
  19. <?php echo $description; /* WPCS: xss ok. */ ?>
  20. </h1>
  21. </div><!-- .site-banner-header -->
  22. <?php } ?>
  23. </div><!-- .site-banner-content -->