content.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Template part for displaying posts.
  4. *
  5. * @package Libre 2
  6. */
  7. ?>
  8. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  9. <header class="entry-header">
  10. <?php $widont = remove_filter( 'the_title', 'widont' ); ?>
  11. <?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
  12. <?php if ( $widont ) add_filter( 'the_title', 'widont' ); ?>
  13. <?php if ( 'post' == get_post_type() ) : ?>
  14. <div class="entry-meta">
  15. <?php libre_2_posted_on(); ?>
  16. </div><!-- .entry-meta -->
  17. <?php endif; ?>
  18. </header><!-- .entry-header -->
  19. <div class="entry-content">
  20. <?php if ( libre_2_has_post_thumbnail() ) { ?>
  21. <div class="post-thumbnail">
  22. <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'libre-2-post-thumbnail' ); ?></a>
  23. </div>
  24. <?php }
  25. /* translators: %s: Name of current post */
  26. the_content( sprintf(
  27. wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'libre-2' ), array( 'span' => array( 'class' => array() ) ) ),
  28. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  29. ) );
  30. ?>
  31. <?php
  32. wp_link_pages( array(
  33. 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'libre-2' ),
  34. 'after' => '</div>',
  35. ) );
  36. ?>
  37. </div><!-- .entry-content -->
  38. <footer class="entry-footer">
  39. <?php libre_2_entry_footer(); ?>
  40. </footer><!-- .entry-footer -->
  41. </article><!-- #post-## -->