I dont understand why this returns nothing but a blank screen.
But if you echo the $attachment->ID you get a string of ID numbers.
The goal is to produce a gallery with the wordpress [gallery] shortcode that includes all the featured images in all post.
$args = array( 'posts_per_page' => -1, 'offset'=> 1, 'post_type' => 'attachment' );
$posts = get_posts( $args );
foreach ( $posts as $attachment ) {
do_shortcode('[gallery type="square" id="'.$attachment->ID.' ,"]');
}
Also, which is it: ID or IDS (the codex shows both?!) and which is better to use ID or INCLUDE to pick which images to use?
NOTE: Tried this in default 20-13 and 20-14 themes, got the same blank results.