Title: Remove images form posts
Last modified: August 21, 2016

---

# Remove images form posts

 *  [Takkemike](https://wordpress.org/support/users/takkemike/)
 * (@takkemike)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/remove-images-form-posts/)
 * Hi,
 * Can I ask for your supreme knowledge for the following problem?
 * On a template page, I want to show 10 posts as a gallery with excerpts (which
   are the first part of the content with a more tag) and the featured image. This
   works like a charm. However, some posts have attached images as well. These are
   shown aswell, but I’d like to remove these from the gallery, but keeping them
   attached in each single post page.
 * I’ve tried a lot, but with no luck. The most recent attempt is:
 * <?php
    $plaatjes = wp_get_attachment_image( $attachment->ID, ” ); remove_filter(‘
   the_content’, $plaatjes ); ?>
 * this is followed by
 * <?php
    global $more; $more = 0; the_content(‘… Lees meer’); ?>
 * This obviously doesn’t work. Hopefully someone can give me a hand with this.
   
   Thank you in advance!
 * Sorry if it it’s unclear. Please let me know if more info is needed.

The topic ‘Remove images form posts’ is closed to new replies.

## Tags

 * [content](https://wordpress.org/support/topic-tag/content/)
 * [remove filter](https://wordpress.org/support/topic-tag/remove-filter/)
 * [wp_get_attachment_image()](https://wordpress.org/support/topic-tag/wp_get_attachment_image/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Takkemike](https://wordpress.org/support/users/takkemike/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/remove-images-form-posts/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
