Market - How to Make All the Featured Images the Same Size
Navigate to Appearance>Editor and click on the page_blog.php file. Look for the following code:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Display centered wide featured image for First Post and left aligned thumbnail for the next five | |
add_action( 'genesis_entry_header', 'market_show_featured_image', 8 ); | |
function market_show_featured_image() { | |
if ( ! has_post_thumbnail() ) { | |
return; | |
} | |
global $wp_query; | |
if( ( $wp_query->current_post <= 0 ) ) { | |
$image_args = array( | |
'size' => 'blog-entry-image', | |
'attr' => array( | |
'class' => 'aligncenter', | |
), | |
); | |
} else { | |
$image_args = array( | |
'size' => 'square-entry-image', | |
'attr' => array( | |
'class' => 'alignleft', | |
), | |
); | |
} | |
$image = genesis_get_image( $image_args ); | |
echo '<div class="home-featured-image"><a href="' . get_permalink() . '">' . $image .'</a></div>'; | |
} |
and change this to:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Display centered wide featured image for First Post and left aligned thumbnail for the next five | |
add_action( 'genesis_entry_header', 'market_show_featured_image', 8 ); | |
function market_show_featured_image() { | |
if ( ! has_post_thumbnail() ) { | |
return; | |
} | |
global $wp_query; | |
if( ( $wp_query->current_post <= 0 ) ) { | |
$image_args = array( | |
'size' => 'square-entry-image', | |
'attr' => array( | |
'class' => 'alignleft', | |
), | |
); | |
} else { | |
$image_args = array( | |
'size' => 'square-entry-image', | |
'attr' => array( | |
'class' => 'alignleft', | |
), | |
); | |
} | |
$image = genesis_get_image( $image_args ); | |
echo '<div class="home-featured-image"><a href="' . get_permalink() . '">' . $image .'</a></div>'; | |
} |
This will make all the featured images the square size positioned to the left.