Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #125019
    pex81
    Participant

    Hi, it’s possible on homepage post setting the thumbnail to width 100%?

    #125039
    Mahesh
    Keymaster

    @pex81: Please post in your site url.

    Regards,
    Mahesh

    #125261
    pex81
    Participant

    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.

    #125295
    Mahesh
    Keymaster

    @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

    #125363
    pex81
    Participant

    Thank you.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Post Thumbnail 100%’ is closed to new replies.