I'm new to wordpress. I was making a theme with articles in a Gallery like style with swiper
And I wanted add video (from vimeo/youtube ...) I've actually copied a php code for a Image only gallery
$args = array( 'numberposts' => -1, // Using -1 loads all posts 'orderby' => 'menu_order', // This ensures images are in the order set in the page media manager 'order'=> 'ASC', 'post_mime_type' => 'image', // Make sure it doesn't pull other resources, like videos 'post_parent' => $post->ID, // Important part - ensures the associated images are loaded 'post_status' => null, 'post_type' => 'attachment' );
And I wanted to know how to add video there.
I tried adding
'post_mime_type' => 'image', 'video', 'iframe',
but it didn't do anything.
Any suggestion ?
Thanks in advance :)