slowtwitch-wp-theme/search.php

45 lines
1.5 KiB
PHP

<?php get_header() ?>
<div class="container">
<div class="column two-thirds search-results-container">
<?php
$post_count = 1;
$total_posts = $wp_query->post_count;
if (have_posts()) {
while (have_posts()) {
the_post();
?>
<div class="archive-article-card">
<a style="display: contents;" href="<?php the_permalink( ) ?>">
<?php the_post_thumbnail('thumbnail'); ?>
<div class="archive-article-text-block">
<h4 class="archive-article-title"> <?php the_title(); ?> </h4>
<div class="archive-article-author-box">
<?php the_author() ?>
<?php the_date() ?>
</div>
<?php the_excerpt() ?>
</div>
</a>
</div>
<?php
if($post_count < $total_posts) {
?> <hr class="slowtwitch-divider"> <?php
}
?>
<?php
$post_count++;
}
}
the_posts_pagination();
wp_reset_postdata();
?>
</div>
<div class="column one-third archive-category-list">
<img class="article-sidebar-ad" src="/wp-content/themes/slowtwitch-wp/assets/images/vertical-ad-mock.jpg" alt="">
<?php dynamic_sidebar('slowtwitch-front-page'); ?>
</div>
</div>
<?php get_footer() ?>