• 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.