I am using Wordpress to create a dynamic gallery using Bootstrap. I created a new custom field and then set it to 'images' and then assigned it to my post type. It then shows up in my post, I uploaded my images into the field and then attempt to put all the attachments into an array and then i will loop through them to display.
$args = array( 'post-type' => 'attachment', 'numberposts' => -1, 'post_status' => 'any', 'post_parent' => $post->ID, 'exclude' => get_post_thumbnail_id() ); $attachments = get_posts($args);
After doing this and doing a var dump with attachments, it says that nothing is in the array