From this page in the codex, i see that this parameter requires an array so i’d try this way:
$vidArgs = array(
'tag__in' => array(5),
'post_type' => 'attachment',
'post_parent' => $post->ID,
'post_mime_type'=>'video/quicktime',
'posts_per_page'=>20
);
$videos = get_posts($vidArgs);
foreach ($videos as $vid) { ///....
Related Posts:
- Retreive tags from attached post for media on page
- How to get attachment file name not attachment URL
- Get attachments (get_posts) and WP 3.5 new uploader
- Query to only return the 2 newest post attachments (images)?
- Get title of post image is attached to
- get_post orderby not working in plugin
- How can i catch (with get_posts) attachment file (pdf, images) from a post when i have only inserted it from media library and it isn’t upload for it?
- Can’t sort get_posts by post_mime_type
- Change attachment inside the_content using filters
- How To Retrieve An Image Attachment’s Alt Text?
- Programmatically adding images to the media library with wp_generate_attachment_metadata randomly fails
- How to cleanly delete attachment but retain original file?
- Trying to hide buttons from Attachment window
- Uploading Multiple Attachments From Front-End With A Description
- Validate alt text for attachments?
- Get all posts (of any post type) an attachment is used in
- How to query with get_posts() for posts with any tag
- Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
- How can I display custom fields value from attachment media?
- how to test for attached image
- Unable to upload specific .zip file type via frontend in WordPress 4.0
- Add_Filter example for wp_get_attachment_link
- Can i hide the attachments from media which I uploaded from front end?
- attachment url rewrite
- Automatically delete attachments and posts [closed]
- How to delete orphan attachments?
- Get the title and URL of the attachment parent post
- Confused with attachment mimetype order
- query attachment images … if no attachments -> get attachments of parent page?
- Replacing with(out) regex link to attachment by links to files
- Getting attachment images is cloning some of them
- Prevent Duplicate Attachment When Using wp_insert_post
- rename attachments based on parent-post-title on upload
- Rename attachments during upload no matter what filetype
- Link all WordPress images size
- Contact Form 7 Data As Attachment [closed]
- Post Via Email – How to send Attachments with it (e.g. PDF File or JPEG Image)?
- Displaying Post Attachment(s) at Top of single.php
- Detach an image from a page using php
- Get the path of the first attached media (single.php)
- custom admin thumbnail for videos, not getting post’s id?
- Custom Gallery HTML only working when images are attached to post/page
- Image Gallery Numbers for 3.5
- How do I link an image to the post it is attached to?
- How to delete a custom file from upload directory when deleting its post
- Open the Attachment Details popup
- How to filter a post in the Tag Cloud widget, using tags of a media library image attached to the post?
- Get attachments for posts that belongs to a specific category
- Attachment page 404
- How to compress image before inserting to wordpress using wp_insert_attachment function?
- Getting “too many redirects” when using wp_redirect for attachment page
- Clean up images, delete unused image sizes attached to a post type
- What is the best way to store thumbnails for a non-image attachment?
- Change default selection for “Embed or Link”?
- What will happen if I delete all my attachment type posts from database?
- How can I make an attachment page for pdf uploads?
- get posts that doesn’t contain a specific tag
- filter get_children to return all mime types EXCEPT ‘x’
- Weird string offset errors when displaying post attachments
- the_time() returning wrong date/time (way in the future)
- Add audio attachment link to RSS
- How to: Retrieve an attachment image from post and output it
- Links to my uploads went crazy
- hide attached images of a post
- How to add a caption to an image attachment in a file list?
- Echo list attachment size in post
- How do I intercept and modify the functionality of wp_get_attachment_image()?
- Creating attachments archive in tags and categories
- Undoing define( ‘UPLOADS’, ”.’files’ ); to repoint to “wp-content/uploads” folder
- Upload image and assign it’s id to post
- Possible to add “Even/Odd Classes” to image attachments via wp_get_attachment_image?
- How to get thumbnail from post attachment in this loop
- How can I rewrite old attachment URLs?
- How to list “invisible” Auto Drafts?
- Why doesnt my tag page populate with this custom post type?
- How to add media from front-end to an existing post and edit file title
- How can I customize the link when an attached image is clicked?
- Add a word to the first // wp_get_attachment_url // as the subdomain name
- How is it possible that a gallery doesn’t have attachment ids?
- Media Library Mess After FTP … /uploads
- Media item permalink goes to source file instead of attachment.php
- wp_delete_attachment doesn’t delete image files / doesn’t work
- Removing images deleted from uploads folder, from Media Library
- Display audio file in audio.php
- how to add data in my custom theme from WP-Admin Panel
- Display setting ‘size’ not available in image settings modal
- Attachment file display link text
- Removing delete permanently button in uploading files media
- Retrieve ONLY mp3s and set a variable for use in a playlist called by single.php template?
- Get video attachment ID and display length
- missing attachment are showing as 404
- Insert attachments from front end form
- How do I add Facebook OpenGraph meta tags for attachments in the header for a custom theme?
- Add link to attachment for old posts
- Drupal 6 to WordPress migration – media attachments
- Move caption in on attachment page
- get_image_tag filter not working
- Bulk delete media by year
- Count images in post then add class if just one
- Media library upload hook