content.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * Template part for displaying posts
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package UIU_CSE
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <header class="entry-header">
  12. <?php
  13. if ( is_singular() ) :
  14. the_title( '<h1 class="entry-title">', '</h1>' );
  15. else :
  16. the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
  17. endif;
  18. if ( 'post' === get_post_type() ) :
  19. ?>
  20. <div class="entry-meta">
  21. <?php
  22. uiu_cse_posted_on();
  23. uiu_cse_posted_by();
  24. ?>
  25. </div><!-- .entry-meta -->
  26. <?php endif; ?>
  27. </header><!-- .entry-header -->
  28. <?php uiu_cse_post_thumbnail(); ?>
  29. <div class="entry-content">
  30. <?php
  31. the_content(
  32. sprintf(
  33. wp_kses(
  34. /* translators: %s: Name of current post. Only visible to screen readers */
  35. __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'uiu-cse' ),
  36. array(
  37. 'span' => array(
  38. 'class' => array(),
  39. ),
  40. )
  41. ),
  42. wp_kses_post( get_the_title() )
  43. )
  44. );
  45. wp_link_pages(
  46. array(
  47. 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'uiu-cse' ),
  48. 'after' => '</div>',
  49. )
  50. );
  51. ?>
  52. </div><!-- .entry-content -->
  53. <footer class="entry-footer">
  54. <?php uiu_cse_entry_footer(); ?>
  55. </footer><!-- .entry-footer -->
  56. </article><!-- #post-<?php the_ID(); ?> -->