feat(blog): add Read more link to post card
This commit is contained in:
@@ -10,7 +10,7 @@ namespace CWC;
|
||||
|
||||
// Determine classes based on sidebar presence
|
||||
if ( hasSidebar() ) {
|
||||
$classes = 'container grid grid-cols-1 lg:grid-cols-4 gap-8 xl:gap-16 my-section mx-auto';
|
||||
$classes = 'container grid grid-cols-1 lg:grid-cols-4 gap-8 xl:gap-16 my-section mx-auto lg:px-0!';
|
||||
$clsEntry = 'lg:col-span-3';
|
||||
} else {
|
||||
$classes = 'container my-section lg:my-0 mx-auto';
|
||||
@@ -23,8 +23,6 @@ get_header();
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<div class="blog-posts <?php echo esc_attr( $clsEntry ); ?>">
|
||||
<div class="post-list">
|
||||
<h1 class="post-list__h1">Blog</h1>
|
||||
|
||||
<div class="post-list__posts grid grid-cols-[repeat(auto-fit,minmax(20rem,1fr))] gap-6">
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
@@ -52,6 +50,8 @@ get_header();
|
||||
<span class="post-list__author"><?php echo esc_html( ucfirst( get_the_author() ) ); ?> —</span>
|
||||
<span class="post-list__date"><?php echo get_the_date(); ?></span>
|
||||
</div>
|
||||
|
||||
<a class="post-list__read-more" href="<?php the_permalink(); ?>">Read more →</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
|
||||
Reference in New Issue
Block a user