home.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php get_header(); ?>
  2. <div id="content" class="site-content">
  3. <div class="container">
  4. <div class="row">
  5. <div class="col-lg-3 d-sm-none d-md-block">
  6. <div class="hp-sidenav navbar sticky-md-top pt-sm-3" role="navigation">
  7. <div class="navbars-collapse">
  8. <div class="flex-column list-group-flush">
  9. <?php get_sidebar() ?>
  10. </div>
  11. </div>
  12. </div>
  13. </div>
  14. <section id="primary" class="content-area col-lg-9 col-md-12">
  15. <div id="main" class="site-main" role="main">
  16. <h1 class="entry-title">News</h1>
  17. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  18. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  19. <div class="row">
  20. <div class="col-lg-6">
  21. <header class="entry-header">
  22. <?php the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );?>
  23. <div class="entry-meta">
  24. <time datetime="<?php echo get_the_date('c'); ?>" itemprop="datePublished"><i class="bi bi-calendar-date m2-1"></i> <?php echo get_the_date(); ?></time>
  25. </div>
  26. </header>
  27. <div class="entry-content">
  28. <?php the_excerpt();?>
  29. </div>
  30. </div>
  31. <div class="col-lg-6">
  32. <div class="post-thumbnail">
  33. <?php the_post_thumbnail('thumbnail', array('width' => 150)); ?>
  34. </div>
  35. </div>
  36. <footer class="entry-footer">
  37. </footer>
  38. </div>
  39. </article>
  40. <hr/>
  41. <?php endwhile;?>
  42. </div>
  43. <div class="row">
  44. <div class="col-sm-12">
  45. <?php the_posts_pagination( array(
  46. 'prev_text' => __( ' &larr; Newer ' ),
  47. 'next_text' => __( ' Older &rarr; ' ),
  48. ));
  49. ?>
  50. <hr/>
  51. </div>
  52. </div>
  53. </section>
  54. </div>
  55. </div>
  56. </div>
  57. <?php get_footer(); ?>