Yuzu Theme
from meowapps.com
This commit is contained in:
28
components/article-cards/small-article-card.php
Normal file
28
components/article-cards/small-article-card.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="article-card-container small">
|
||||
<div class="article-card">
|
||||
<?php $featured_image = get_the_post_thumbnail_url(get_the_ID(),'large'); ?>
|
||||
<a href="<?= get_the_permalink(); ?>" class="article-featured-image" style="background-image: url(<?= $featured_image; ?>)"></a>
|
||||
<div class="article-meta">
|
||||
<div class="article-categories">
|
||||
<?php
|
||||
$post_categories = wp_get_post_categories( get_the_ID() );
|
||||
foreach($post_categories as $c){
|
||||
$cat = get_category( $c );
|
||||
?>
|
||||
<a href="<?= get_term_link($c); ?>" class="article-category">
|
||||
<?= $cat->name; ?>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<a href="<?= get_the_permalink(); ?>" class="article-title"><?= get_the_title(); ?></a>
|
||||
<div class="article-excerpt">
|
||||
<?= get_the_excerpt(); ?>
|
||||
</div>
|
||||
<a href="<?= get_the_permalink(); ?>" class="read-more-btn">
|
||||
<?php _e('Read More', 'yuzu'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user