Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #245073
    Bastien Chilloux
    Participant

    Hi,

    I would like to know if it is possible to show featured images (concerning posts) in a smaller size on top of posts in archive and category pages ?

    As you can see (https://bastienchilloux.com/news/) it is quite big to my opinion ^^

    Thank you in advance !

    #245096
    Skandha
    Participant

    @bastienchill: Hello Bastien,
    Go to => Child Theme Folder => functions.php and add the following Code.

    function bold_photography_archive_image() {
    	if ( ! has_post_thumbnail() ) {
    		// Bail if there is no featured image.
    		return;
    	}
    
    	$archive_layout = get_theme_mod( 'bold_photography_content_layout', 'excerpt' );
    
    	if ( 'full-content' === $archive_layout ) {
    		// Bail if full content is selected.
    		return;
    	}
    	
    	bold_photography_post_thumbnail( array(666,666) );
    }

    Now replace 666,666 in the array with the size you want the images in the archive to be.
    Let me know if t his works out!
    Kind Regards,
    Skandha

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘How to resize posts featured images display on archive page and category pages’ is closed to new replies.