- This topic has 4 replies, 2 voices, and was last updated 6 years, 6 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The topic ‘Post Thumbnail 100%’ is closed to new replies.
Premium Responsive WordPress Themes with advanced functionality and awesome support. Simple, Clean and Lightweight Responsive WordPress Themes
Hi, it’s possible on homepage post setting the thumbnail to width 100%?
http://www.irecucce.it on categories
http://www.irecucce.it/category/eventi/
now on home page it work but on categories i don’t know.
@pex81: For this you’ll need to create a child theme. You can find more details on creating child theme HERE. Then in your child theme’s functions.php
add the following codes:
function rock_star_archive_content_image() {
$options = rock_star_get_theme_options();
$content_layout = $options['content_layout'];
$archive_top_layout = $options['archive_top_layout'];
if ( has_post_thumbnail() && 'full-content' != $content_layout ) { ?>
<figure class="featured-image">
<a rel="bookmark" href="<?php the_permalink(); ?>">
<?php
if ( 'excerpt-image-left' == $content_layout || 'excerpt-image-right' == $content_layout ) {
the_post_thumbnail( 'rock-star-landscape' );
}
elseif ( 'excerpt-image-top' == $content_layout ) {
if ( 'one-column' == $archive_top_layout ) {
the_post_thumbnail( 'full' );
}
else {
the_post_thumbnail( 'full' );
}
}
?>
</a>
</figure>
<?php
}
}
Regards,
Mahesh
Thank you.