Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $the_query = new WP_Query( array(
- 'post_type' => 'attachment',
- 'category_name' => 'photos',
- 'posts_per_page' => 25,
- ));
- while ( $the_query->have_posts() ) : $the_query->the_post();
- $attachment_data = wp_prepare_attachment_for_js($attachment);
- echo '<div><div>
- <img src="'.wp_get_attachment_url ('medium').'"/>
- </div><div> List of Posts Go Here </div>';
- endwhile; wp_reset_postdata();?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement