recent articles page
This commit is contained in:
parent
49c74c2b6c
commit
7e808ec01b
38
page-articles.php
Normal file
38
page-articles.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?php get_header() ?>
|
||||||
|
|
||||||
|
<div class="st-main-grid">
|
||||||
|
<div class="st-article-archives">
|
||||||
|
<?php
|
||||||
|
query_posts( array( 'posts_per_page' => 25, 'post_status' => 'publish' ) );
|
||||||
|
$count = $wp_the_query->post_count;
|
||||||
|
if (have_posts()) {
|
||||||
|
while (have_posts()) {
|
||||||
|
the_post();
|
||||||
|
$category = get_the_category()[0];
|
||||||
|
$count++;
|
||||||
|
?>
|
||||||
|
<article class="st-article-archive-article">
|
||||||
|
<a href="<?php the_permalink(); ?>" class="st-article-section-wide-article__image-link">
|
||||||
|
<?php the_post_thumbnail(); ?>
|
||||||
|
</a>
|
||||||
|
<div class="st-article-section-wide-article__text-container">
|
||||||
|
<a href="<?php echo home_url($category->slug); ?>"
|
||||||
|
class="st-article-section-wide-article__category-link"><?php echo $category->name; ?></a>
|
||||||
|
<a class="st-article-section-wide-article__title" href="<?php the_permalink(); ?>">
|
||||||
|
<h3><?php the_title(); ?></h3>
|
||||||
|
</a>
|
||||||
|
<p class="st-article-section-wide-article__excerpt"><?php the_excerpt(); ?></p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</article>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
wp_reset_postdata();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php list_pagination($count); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php get_footer() ?>
|
Loading…
Reference in New Issue
Block a user