Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am trying to do exactly the same, but no success so far… And you?

    Thread Starter MaTiZzz

    (@matizzz)

    Thanks. This brought me one step further to a solution.
    The content I would like to target is generated in a theme specific php file (single-portfolio.php) shown here:

    <div class="container clear">
            <div class="content">
                <div id="show">
                    <?php
                        $args = array(
                            'post_type' => 'attachment',
                            'orderby' => 'menu_order',
                            'order' => ASC,
                            'numberposts' => -1,
                            'post_status' => null,
                            'post_parent' => $post->ID,
                            'exclude' => get_post_thumbnail_id()
                        );
                        $attachments = get_posts($args);
                        if ( $attachments ):
                            foreach ( $attachments as $attachment ):
                                echo wp_get_attachment_image($attachment->ID, 'full');
                            endforeach;
                        endif;
                    ?>
                </div>
            </div>

    Is there a tag so I can target images in an attachment with a post rendering hook?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)