feat: make article titles and thumbnails clickable

Enhanced user navigation by wrapping article titles and thumbnails within anchor tags linked to the respective articles' permalink in archive-article.php and index.php. Updated styles for article titles to improve the visual appeal.
This commit is contained in:
Kumi 2024-06-20 14:52:37 +02:00
parent b3246b8549
commit 4310ea6fb8
Signed by: kumi
GPG key ID: ECBCC9082395383F
3 changed files with 17 additions and 4 deletions

View file

@ -31,10 +31,14 @@
<div class="col-md-4">
<div class="card mb-4 shadow-sm">
<?php if (has_post_thumbnail()) : ?>
<img src="<?php the_post_thumbnail_url(); ?>" class="card-img-top" alt="<?php the_title(); ?>">
<a href="<?php the_permalink(); ?>">
<img src="<?php the_post_thumbnail_url(); ?>" class="card-img-top" alt="<?php the_title(); ?>">
</a>
<?php endif; ?>
<div class="card-body">
<h5 class="card-title"><?php the_title(); ?></h5>
<a href="<?php the_permalink(); ?>">
<h5 class="card-title"><?php the_title(); ?></h5>
</a>
<p class="card-text">
<?php
$authors = get_post_meta(get_the_ID(), 'article_authors', true);

View file

@ -22,10 +22,14 @@
<div class="col-md-4">
<div class="card mb-4 shadow-sm">
<?php if (has_post_thumbnail()) : ?>
<img src="<?php the_post_thumbnail_url(); ?>" class="card-img-top" alt="<?php the_title(); ?>">
<a href="<?php the_permalink(); ?>">
<img src="<?php the_post_thumbnail_url(); ?>" class="card-img-top" alt="<?php the_title(); ?>">
</a>
<?php endif; ?>
<div class="card-body">
<h5 class="card-title"><?php the_title(); ?></h5>
<a href="<?php the_permalink(); ?>">
<h5 class="card-title"><?php the_title(); ?></h5>
</a>
<p class="card-text">
<?php
$authors = get_post_meta(get_the_ID(), 'article_authors', true);

View file

@ -78,4 +78,9 @@ footer p {
footer .social-media img {
height: 24px;
}
a h5 {
color: #333;
text-decoration: none;
}