You can add 'post_mime_type' => '...'
to your $args
, as in:
$mime_types = array ('audio', 'application') ;
$args = array (
'post_type' => 'attachment',
'post_status' => 'inherit',
'post_mime_type' => $mime_types,
) ;
$query = new WP_Query ($args) ;
See Mime-Type Parameters for more info.
It’s not documented very well but the mime-types you set can be “partial”, i.e., audio
will match all audio formats, whereas audio/mp3
will only match MP3, etc.
I’m not sure what mime-type your “TRANSCRIPT” has, but I’m sure you do.
Related Posts:
- How to output functions from plugin inside theme
- wp_schedule_event is registered but function isn’t running
- Working of foreach loop with array
- Call to undefined function error in plugin
- Overwriting a plugin function
- Writing editor content to a file
- Execute Jquery when a specific page in my plugin is loading
- Different registration form for different roles
- Remove Permalink Meta Box not working?
- More gentle way to hook WordPress custom url
- How to add custom function to pluggable.php
- Adding Permalink to Slides with ‘Simple Nivo Slider’ plugin?
- Adding tables to dashboard pages programmatically?
- Setting a post’s category
- Setting post_id for single.php based on URL without a redirect
- Why doesn’t update_post_meta work for certain strings?
- using admin functions on frontend
- Javascript Function Called Too Early in PHP Script
- Modify code for functions.php with specific twitter user url and hashtags
- post content and shortcode content displaying out of order
- can’t access some WordPress function from my plugin
- “Rendering of admin template [path to template] failed”
- WP 3-way voting system: On to something! Please help!
- How to determine which capability to use?
- Custom Settings Plugin Save foreach checkboxes
- send popup after wp_redirect()
- Customise Grouped Product display in Woocommerce with custom column
- Change the behaviour of a button
- Checkbox show / hide output result
- Can someone explain what’s the use of parse request function in WordPress?
- Using ACF Relationship field to set post type to draft or published status
- How to change basename url for wp-admin?
- Allow a particular user to access a particular plugin?
- How to Send Pingbacks for all Posts in WordPress?
- Reliable way to add nonce to HTTP Header in WordPress?
- Add default value from selection
- Cookie value changes back to previous value after changing
- Only the first image uploads
- function add custom fields to media gallery
- Add Pre-Defined Value to Click Counter in WordPress
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- Illegal string offset checkbox
- ssl redirect function is not working
- Override category archive page title (not the head title)
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Custom plugin: how do I call a PHP file if settings option is set to true?
- adding dynamic/multiple slug values in ‘option_none_value’
- Make visible page only in the trash
- How can i avoid duplicate same post in wp?
- Redirection from a specific page for users logged in but not with membership
- Display a custom name when the user has no name settle in his account
- WordPress: I wanted to use Add rewrite rule multiple times for multiple CPT in my plugin
- working code, not working – Plugin Dev
- In a foreach loop, how can I add a meta value if it doesn’t exist?
- Why would one specify multiple arguments when using get_previous_posts_link() which takes only one parameter?
- wp_ajax add_action fuction won’t fire on custom jQuery action
- register_activation_hook doesn’t fire at all
- Add function to Dokan ajax class
- PHP get_category() function redeclared
- My ajax request don´t work and return 0
- WordPress environment not loading properly
- How to Request a User to Register on Landing at a Site, Then Automatically Delete the Users Password on Logout?
- Populate select option with JSON file
- Remove from a div by class name from post page if post author role is not administrator
- Function not working on any file other than the main plugin file
- Building WordPress Themes With Bootstrap with Adi Purdila → TutsPlus
- Private messaging – Getting and displaying the avatar/url of a message recipient
- Ajax not working to insert, query and result data
- Template file structure , wordpress hook for altering the template
- WordPress permalink setting
- How can I see a varibles value when my plugin runs?
- How can I add recent posts to menu like mashable
- Why is ‘register_activation_hook’ undefined?
- Saving an array to get_options
- Permission error on plugin save
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- Dynamic banner for use on external sites
- How to add a handler for a button in plugin?
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Doing action based on input from options menu
- Trouble using wordpress functions in a pop-up modal form
- How can i call from custom fields to the category editor?
- Custom options page for themes
- Why does this fail: Disabling plugins enqueue_script() in functions.php
- Call do_action() within WordPress cronjob
- How use Dynamic hyperlink on each wordpress post?
- Issues separating my Plugin pages into different files
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- display php code in header using wp_head()
- How to plugin function code move to theme function.php ? I’ve tried below code but not working [closed]
- WordPress simple ‘Hello World’ plugin – problems
- How do I change the Go To Categories link in the term_updated_messages
- WP Custom tables query
- get_term_by() returning null on plugin
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Mixed results with is_page() WordPress function, when using $this, or self
- Read page- or post-content across different builder-plugins
- check difference between two timestamp in custom plugin
- Sticky bar with filter button and product count