Home › Forums › Support › How can I get Featured Image In Sections This topic has 1 reply, 2 voices, and was last updated 3 years, 6 months ago by Elvin. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts October 14, 2020 at 4:52 pm #1489430 Het Basically I am using sections and of course the featured image disappeared. Any way I can use featured image? This piece of code in my child theme doesn’t seem to work/the shortcode. function fun_featured_image() { ob_start();?> global $post; <?php $featured_img_url = get_the_post_thumbnail_url();?> ” alt=”<?php the_title(); ?>”> <?php return ob_get_clean(); } October 14, 2020 at 5:21 pm #1489452 ElvinStaff Customer Support Hi, Some html tags are missing from your code. Try this out: add_shortcode( 'fun_featured_image', function() { ob_start(); global $post; $featured_img_url = get_the_post_thumbnail_url($post->id); echo '<img src="'.$featured_img_url.'" alt="'.get_the_title($post->id).'"/>'; return ob_get_clean(); }); You can then use the shortcode [fun_featured_image] to display your featured image. Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In