Support » Fixing WordPress » TimThumb.php

Viewing 1 replies (of 1 total)
  • chadvonlind

    (@chadvonlind)

    Try using this code within the loop.

    <?php
                        $args = array( 'post_type' => 'attachment', 'orderby' => 'menu_order', 'order' => 'ASC', 'post_mime_type' => 'image' ,'post_status' => null, 'post_parent' => $post->ID );
                        $attachments = get_posts($args);
                        if ($attachments) {
                            foreach ( $attachments as $attachment ) { ?>
                            <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/thumb.php?h=180&w=400&zc=1&src=<?php echo wp_get_attachment_url( $attachment->ID , false ); ?>" alt="<?php the_title(); ?>" width="400" height="180" border="0" /></a>
                        <?php	}
                            }
                        ?>
Viewing 1 replies (of 1 total)
  • The topic ‘TimThumb.php’ is closed to new replies.