Support » Fixing WordPress » Hide images from excerpt

  • dan



    The category pages on my blog show an excerpt of my posts and my theme then allows me to have a small thumbnail image next to the excerpt. It looks nice and neat when working correctly.
    However, within the full post I use larger, header type images that span the width of the post box. The problem is that the excerpt then displays this large image and breaks my layout because it’s trying to squeeze it next to the thumbnail created by my theme.

    Is there a way I can remove the images showing up in the excerpt?

    Any help would be appreciated.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Christine Rondeau


    Volunteer Forum Moderator

    Can you provide a link to your site please?



    Hi Christine, thanks for your reply. The site is actually being hosted locally as I am redeveloping it for my work.

    Here is an image of the post excerpt though so you can get an idea of what I’m talking about:

    From what I’ve been reading, am I correct in thinking that the_excerpt() is supposed to remove images by default? If this is the case, does this mean that my theme is using something other than the_excerpt() to display the post excerpt?

    Christine Rondeau


    Volunteer Forum Moderator

    If you look in your theme file, you should see next to the excerpt() , the_post_thumbnail.

    You can either remove that or change it to the_post_thumbnail( ‘thumbnail’ );

    that will ensure that the thumbnail is selected and not the full image.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide images from excerpt’ is closed to new replies.