Archived topic
Featured image parameter
22 replies · Started by Charles on January 7, 2022
Adjusting single blog page parameters in the customizer changes name and date but does not change any featured image aspects. Thanks.
Hi there,
Any chance you can link us to the site in question?
You can use the private information field:
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
Are you referring to these images?
https://www.screencast.com/t/wlpGre0In
That section is coming from a third-party plugin so GP's customizer settings wouldn't apply.
Oh, sorry, no, I meant featured images on single posts.
How can I change the size of this featured image, for instance?
Hi there,
i think theres some crossed wires - looking at the post your provided - there is no featured image being displayed. Only images that are within the content of the post. The size of those images are defined when they are added to the post content its not something the theme controls.
This page has a featured image. I think it is full size, but I'd like to make it not stretch across the page.
https://gettysburgconnection.org/sidney-poitier-hollywoods-first-black-leading-man-reflected-the-civil-rights-movement-on-screen/
I just checked the page above and it doesn't have a featured image:
https://www.screencast.com/t/sY6OQgSR
You said:
But it shows as a featured image when I edit it.
Are you referring to the featured image option here?
https://docs.generatepress.com/article/adding-featured-images/
Please reply here and not through e-mail.
Thanks!
Yes, it's input as a featured image:

But I do have this PHP to move it to after the 2nd paragraph:
add_filter( 'the_content', 'insert_featured_image', 20 );
function insert_featured_image( $content ) {
$feat_img = get_the_post_thumbnail($post->ID, 'post-single');
if ( is_single() && ! is_admin() ) {
return prefix_insert_after_paragraph( $feat_img, 2, $content );
}
return $content;
}
// Parent Function that makes the magic happen
function prefix_insert_after_paragraph( $insertion, $paragraph_id, $content ) {
$closing_p = '</p>';
$paragraphs = explode( $closing_p, $content );
foreach ($paragraphs as $index => $paragraph) {
if ( trim( $paragraph ) ) {
$paragraphs[$index] .= $closing_p;
}
if ( $paragraph_id == $index + 1 ) {
$paragraphs[$index] .= $insertion;
}
}
return implode( '', $paragraphs );
}
And then I must be turning off the featured image itself somewhere else.
I guess it's not just moving the featured image it's making a separate image using the featured image thumbnail?
What happens if you remove the functions for now?
The featured image is at the top of the page and follows the sizing from the customizer blog page parameters as it should.
But I'd still like it to appear after the 2nd paragraph...