archive-news.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <?php
  2. /**
  3. * The template for displaying news archive page
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package UIU_CSE
  8. */
  9. get_header();
  10. ?>
  11. <main id="primary" class="site-main">
  12. <section id="archive-hero">
  13. <div class="container">
  14. <!-- breadcrumb -->
  15. <nav aria-label="breadcrumb">
  16. <ul>
  17. <li><a href="/">Home</a></li>
  18. <li>News</li>
  19. </ul>
  20. </nav>
  21. <div class="content">
  22. <!-- left content -->
  23. <div class="left-content">
  24. <div class="main-title">News</div>
  25. <div class="short-details">
  26. Here you will have access to all United International University News.
  27. </div>
  28. <div class="links">
  29. <!-- message -->
  30. <a href="#">
  31. <img src="<?php echo (get_template_directory_uri()) ?>/img/envelope-solid.svg" alt="">
  32. </a>
  33. <!-- printer -->
  34. <a href="#">
  35. <img src="<?php echo (get_template_directory_uri()) ?>/img/print-solid.svg" alt="">
  36. </a>
  37. <!-- facebook -->
  38. <a href="#">
  39. <img src="<?php echo (get_template_directory_uri()) ?>/img/facebook-f.svg" alt="">
  40. </a>
  41. <!-- twitter -->
  42. <a href="#">
  43. <img src="<?php echo (get_template_directory_uri()) ?>/img/twitter.svg" alt="">
  44. </a>
  45. <!-- linkedin -->
  46. <a href="#">
  47. <img src="<?php echo (get_template_directory_uri()) ?>/img/linkedin-in.svg" alt="">
  48. </a>
  49. </div>
  50. </div>
  51. <!-- right content -->
  52. <div class="right-content">
  53. <img src="<?php echo (get_template_directory_uri()) ?>/img/campus_07.jpg" alt="">
  54. </div>
  55. </div>
  56. </div>
  57. </section>
  58. <div class="sections">
  59. <section id="all-news" class="container">
  60. <div class="parent-grid">
  61. <?php if (have_posts()) : ?>
  62. <?php while (have_posts()) : the_post(); ?>
  63. <div class="stub grid-sub-item">
  64. <div class="stub-img-holder">
  65. <img class="stub-img" src="<?php echo get_the_post_thumbnail_url() ?>" alt="">
  66. </div>
  67. <span class="news-date"><?php the_field('news_date'); ?></span>
  68. <a href="<?php echo get_permalink(); ?>">
  69. <h3><?php echo get_the_title(); ?></h3>
  70. </a>
  71. </div>
  72. <?php endwhile; ?>
  73. <?php the_posts_navigation(); ?>
  74. <?php
  75. else :
  76. get_template_part('template-parts/content', 'none');
  77. endif;
  78. ?>
  79. </div>
  80. </section>
  81. </div>
  82. </main><!-- #main -->
  83. <style>
  84. header {
  85. height: 100px !important;
  86. }
  87. #all-news {
  88. display: flex;
  89. flex-direction: column;
  90. }
  91. #all-news h2 {
  92. color: #000 !important;
  93. margin-top: 40px;
  94. margin-bottom: 20px;
  95. }
  96. #all-news .stub {
  97. margin: 30px auto;
  98. }
  99. #all-news .stub-img-holder {
  100. height: 200px;
  101. overflow: hidden;
  102. }
  103. #all-news .stub-img-holder img {
  104. height: 100%;
  105. width: 100%;
  106. -o-object-fit: cover;
  107. object-fit: cover;
  108. -o-object-position: center;
  109. object-position: center;
  110. }
  111. #all-news .news-date {
  112. display: block;
  113. color: #485680;
  114. font-weight: 800;
  115. font-size: 14px;
  116. margin: 10px 0px !important;
  117. }
  118. #all-news h3 {
  119. height: 50px;
  120. font-size: 18px;
  121. line-height: 22px;
  122. font-family: "Open Sans", sans-serif;
  123. color: #2F4858 !important;
  124. margin: 20px auto;
  125. }
  126. /*# sourceMappingURL=archive-news.css.map */
  127. </style>
  128. <?php
  129. get_footer();