WordPress attachments in query_posts…
-
Morning,
I need some guidance on some WP code. I’m wondering if it’s possible to take this code (which is grabbing all the images from the posts across my site and dumping them out):
$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => null ); $attachments = get_posts( $args ); if ($attachments) { foreach ( $attachments as $post ) { setup_postdata($post); the_attachment_link($post->ID, true); the_excerpt(); } }
and use the
query_posts();
function in WP instead so I could create some pagination for all the images.Thanks in advance,
R
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘WordPress attachments in query_posts…’ is closed to new replies.