content-hero.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * The template used for displaying hero content in page.php and page-templates.
  4. *
  5. * @package Pique
  6. */
  7. ?>
  8. <article id="pique-hero" <?php post_class( 'pique-panel' ); ?>>
  9. <?php if ( has_post_thumbnail() ) :
  10. $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'pique-hero' ); ?>
  11. <div class="pique-panel-background" style="background-image:url(<?php echo esc_url( $thumbnail[0] ); ?>)"></div>
  12. <?php endif; ?>
  13. <div class="pique-panel-content">
  14. <div class="entry-content">
  15. <?php
  16. /* translators: %s: Name of current post */
  17. the_content( sprintf(
  18. wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'pique' ), array( 'span' => array( 'class' => array() ) ) ),
  19. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  20. ) );
  21. ?>
  22. </div><!-- .entry-content -->
  23. </div><!-- .pique-panel-content -->
  24. <footer class="entry-footer">
  25. <?php pique_edit_link( get_the_ID() ); ?>
  26. </footer><!-- .entry-footer -->
  27. </article><!-- #post-## -->