123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <?php
- /**
- * The template for displaying news archive page
- *
- * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
- *
- * @package UIU_CSE
- */
- get_header();
- ?>
- <main id="primary" class="site-main">
- <div class="sections">
- <section id="all-news" class="container">
- <h2>All News</h2>
- <hr>
- <div class="parent-grid">
- <?php if (have_posts()) : ?>
- <?php while (have_posts()) : the_post(); ?>
- <div class="stub grid-sub-item">
- <div class="stub-img-holder">
- <img class="stub-img" src="<?php echo get_the_post_thumbnail_url() ?>" alt="">
- </div>
- <span class="news-date"><?php the_field('news_date'); ?></span>
- <a href="<?php echo get_permalink(); ?>">
- <h3><?php echo get_the_title(); ?></h3>
- </a>
- </div>
- <?php endwhile; ?>
- <?php the_posts_navigation(); ?>
- <?php
- else :
- get_template_part('template-parts/content', 'none');
- endif;
- ?>
- </div>
- </section>
- </div>
- </main><!-- #main -->
- <style>
- header {
- height: 100px !important;
- }
- #all-news {
- display: flex;
- flex-direction: column;
- }
- #all-news h2 {
- color: #000 !important;
- margin-top: 40px;
- margin-bottom: 20px;
- }
- #all-news .stub {
- margin: 30px auto;
- }
- #all-news .stub-img-holder {
- height: 200px;
- overflow: hidden;
- }
- #all-news .stub-img-holder img {
- height: 100%;
- width: 100%;
- -o-object-fit: cover;
- object-fit: cover;
- -o-object-position: center;
- object-position: center;
- }
- #all-news .news-date {
- display: block;
- color: #485680;
- font-weight: 800;
- font-size: 14px;
- margin: 10px 0px !important;
- }
- #all-news h3 {
- height: 50px;
- font-size: 18px;
- line-height: 22px;
- font-family: "Open Sans", sans-serif;
- color: #2F4858 !important;
- margin: 20px auto;
- }
- /*# sourceMappingURL=archive-news.css.map */
- </style>
- <?php
- get_footer();
|