You probably have to create a function in your functions.php file using
http://codex.ww.wp.xz.cn/Function_Reference/has_post_thumbnail
it accepts the page ID. You can make your function as shortcode
http://codex.ww.wp.xz.cn/Shortcode_API
so it can be inserted into your posts.
I haven’t seen a plugin for this yet (although it might exist).
Thread Starter
pet3r
(@sboerupgmailcom)
I currently have this array on a page:
<?php $args = array(
‘orderby’ => ‘menu_order’,
‘order’ => ‘ASC’,
‘post_type’ => ‘attachment’,
‘post_parent’ => $page_id = 1339,
‘post_mime_type’ => ‘image’,
‘post_status’ => null,
‘numberposts’ => $imageNumber
);
$attachments = get_posts($args);
$args2 = array(
‘post_type’ => ‘attachment’,
‘post_parent’ => $page_id = 1339,
‘post_mime_type’ => ‘image’,
‘post_status’ => null,
‘numberposts’ => -1
);
$attachments2 = get_posts($args2);
?>
I manually entered the page_id and it pulls the attachments from a different page. I would love to be able to have it pull attachments from multiple pages. The “post_parent” looks like the only line of concern, I just don’t know how the specifics for multiple IDs there