fix: display featured images at full width, centered
The theme was rendering featured images at WordPress 'medium' size (300×300 square crop) instead of the full 1200×632 original. Changed the_post_thumbnail() from 'medium' to 'full' and added responsive CSS that scales images to 100% content width with centered alignment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
18
style.css
18
style.css
@@ -583,6 +583,24 @@ nav a {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
/* ---- FEATURED IMAGES ---- */
|
||||
|
||||
.ps-featured-image {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
border-radius: var(--radius-lg);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ps-featured-image img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
border-radius: var(--radius-lg);
|
||||
}
|
||||
|
||||
/* ---- BADGES & TAGS ---- */
|
||||
|
||||
.ps-badge {
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
?>
|
||||
<div style="margin-bottom: var(--spacing-lg);">
|
||||
<?php the_post_thumbnail( 'medium' ); ?>
|
||||
<div class="ps-featured-image" style="margin-bottom: var(--spacing-lg);">
|
||||
<?php the_post_thumbnail( 'full' ); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user