• Resolved ksteingrandt

    (@ksteingrandt)


    Hi all

    I have modified my child theme’s content.php to show the featured image on my site’s blog page. However, it is still showing the first image embedded in each post alongside the featured image.

    How can I show the featured image if there is one, and only show the first embedded image if there is no featured image? I probably need an “else” statement in my code below, but not sure what it should say.

    The code I added to content.php is, just below the entry-content div:

    <?php
        			if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
      			the_post_thumbnail();
    			}
    			?>

    The site is https://finland.embassy.digital2.getusinfo.com/?page_id=1271. You can see the first post listed shows the first embedded image as well as the featured image. I just want to show the featured image and remove the embedded image from this page.

  • The topic ‘remove first embedded image from blog page?’ is closed to new replies.