Home › Forums › Support › Featured Image after first paragraph This topic has 7 replies, 3 voices, and was last updated 2 years, 11 months ago by David. Viewing 8 posts - 1 through 8 (of 8 total) Author Posts April 12, 2018 at 6:37 pm #548873 Vish Hello! How to make the featured image appear after the first paragraph in the posts? Thanks! April 12, 2018 at 9:01 pm #548966 TomLead Developer Lead Developer You could try: 1. Disabling the featured image in Customize > Layout > Blog. 2. Adding a function like this: https://wordpress.stackexchange.com/a/61280 October 5, 2020 at 1:45 am #1472588 Immi Hi Tom, If I want to appear it to after 3 paragraphs, then what should I change in above code. October 5, 2020 at 2:52 am #1472691 DavidStaff Customer Support Hi there, try the method provided here: https://generatepress.com/forums/topic/featured-image-inside-the-article/#post-708308 In that function you will see this line: return prefix_insert_after_paragraph( $feat_img, 2, $content ); Change the 2 to 3 October 5, 2020 at 7:54 am #1473214 Immi Thanks, David October 5, 2020 at 8:20 am #1473275 DavidStaff Customer Support You’re welcome May 8, 2021 at 7:42 am #1770458 Liran Is it possible to exclude pages with the function that Tom suggested? May 8, 2021 at 9:25 am #1770541 DavidStaff Customer Support Hi there, you would need to include a template tag condition to the rule – for example: add_filter( 'the_content', 'insert_featured_image', 20 ); function insert_featured_image( $content ) { if ( !is_page() ) { $content = preg_replace( "/<\/p>/", "</p>" . get_the_post_thumbnail($post->ID, 'post-single'), $content, 1 ); } return $content; } This will only add the featured image IF ITS NOT a Page. Author Posts Viewing 8 posts - 1 through 8 (of 8 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In