我认为没有必要使用主题文件夹来保存一些滑块图片。
您可以使用帖子或页面作为“图库持有者”(甚至可以将其保留为草稿),并按如下方式提取其图像附件:
function getSimpleGal($id){
$results = get_children( array(
\'post_parent\' => $id,
\'post_status\' => \'inherit\',
\'post_type\' => \'attachment\',
\'post_mime_type\' => \'image\',
\'order\' => \'ASC\',
\'orderby\' => \'menu_order ID\') );
foreach ( $results as $image ) {
// instead of "full", use your custom image size
$attachmentimage=wp_get_attachment_image_src( $image->ID, "full" );
echo \'<img src="\'.$attachmentimage[0].\'" title="\'.$image->post_title.\'" width="\'.$attachmentimage[1].\'" height="\'.$attachmentimage[2].\'" />\';
}
}