Archived topic
modify image-size name on single.php
3 replies · Started by Colin on June 28, 2019
Viewing posts 1–4 of 4
Hi, it appears the featured image on single.php is added via hooks and using "full".
I would like to change the wp image size "name" to my custom name/dimensions. Could you point me in the right direction for this?
Note: This is on single.php not archives.
Thanks!
Hi there,
Try this:
add_filter( 'generate_page_header_default_size', function( $size ) {
if ( is_single() ) {
$size = 'your-name-here';
}
return $size;
} );
Let me know :)
Worked! Thank you!
You're welcome :)
This archived topic is closed to new replies.