I am using the Advanced Custom Fields plugin to add a WYSIWYG field that I have uploaded an image gallery into. After the new Media Uploader WP update I can no longer edit the existing galleries as they do not show up in the WYSIWYG, but the images are still attached to the post. If I add new images they show up on the front end but I can not control the order and can not delete them from the post. Is there a way to reconnect the editor to the existing images so I can edit them from the post?
Here is the code I'm using to retrieve the images from the post:
$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID, 'orderby' => 'menu_order', 'order' => 'ASC', );
$attachments = get_posts($args);
if ($attachments) {
foreach ( $attachments as $attachment ) {
echo '<li>';
echo wp_get_attachment_image($attachment->ID, 'large');
echo '</li>'; }
}
attachmentpost-types, or are they attached to the post as post custom meta data? – Chip Bennett Mar 2 at 22:23