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:
- Get page content using slug
- What is the correct way to build a widget using OOP
- What is an alternative method to the WordPress private _doing_it_wrong() function
- Customizing subject in comment notification e-mails
- Fatal error: Call to undefined function plugin_dir_path()
- function triggered by “manage_users_custom_column” filter not working
- WordPress plugin how to run function when button is clicked
- Dynamic URL to reference custom PHP files
- Shortcodes, output buffering, and WordPress functions
- When to check if a function exists
- Two-step login process – Is it possible?
- Problem with `wp_mail()`
- Calling a function from functions.php in custom page/ blog post
- What is the difference between current_page_parent and current_page_ancestor?
- Plugin development: is adding empty index.php files necessary?
- Admin-ajax.php appending a status code to ajax response
- wp_enqueue_script + wp_enqueue_style Since When
- How to access function from outside of a class within this class in WP plugin?
- Widget update function not saving values
- PHP can I add line numbers to file_get_contents()
- $content variable – Is this a reserved variable for a WordPress function? – php / wordpress
- How to use WP_Term with (menu) argument in the wp_nav_menu?
- WordPress after content Hook & external template part
- override pluggable.php functions
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- Can I change header.php of current theme through a plugin function?
- Applying OO patterns and principles to plugin development
- get_current_screen() return null
- creating custom function to log actions in plugin
- Adding Default Settings to Theme My Login plugin
- Swapping wp_dropdown_categories function with wp_category_checklist
- Maximum lifetime for nonce
- How to customize a permalink (URL) structure?
- Edit Yoast SEO breadcrumbs output [closed]
- Adding option to Gallery shortcode
- Failed to Open Stream: Permission Denied While Writing to an XML File in a WordPress Plugin
- How can I remove a function that has been added to wordpress with add_filter?
- How to change the hover content of a specific menu item on WordPress?
- what is the best practice to add new field to an api route
- How do I update a field of a meta box?
- WordPress function get_the_terms() returns ‘Invalid taxonomy’ error
- WordPress get_avatar function not correct working
- wp_get_theme Warning: Illegal offset type
- Check if variable is set in filter
- Print Dashboard submenu name and filename
- Using data sent via AJAX in multiple functions on a WP plugin
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- Apply styles to blockquote element with the WYSIWYG editor
- Custom meta box values are not getting saved for my custom post type
- how to save checkbox data for custom setting?
- Plugin onclick button activate other plugin
- How to output functions from plugin inside theme
- Call to undefined function error in plugin
- Execute Jquery when a specific page in my plugin is loading
- Different registration form for different roles
- Remove Permalink Meta Box not working?
- Setting a post’s category
- Setting post_id for single.php based on URL without a redirect
- 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”
- Customise Grouped Product display in Woocommerce with custom column
- Change the behaviour of a button
- 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?
- Add default value from selection
- Cookie value changes back to previous value after changing
- Only the first image uploads
- Add Pre-Defined Value to Click Counter in WordPress
- Illegal string offset checkbox
- Override category archive page title (not the head title)
- Custom plugin: how do I call a PHP file if settings option is set to true?
- How can i avoid duplicate same post in wp?
- Redirection from a specific page for users logged in but not with membership
- 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?
- How to override theme’s public static function inside of a trait?
- I cant add is_admin control to plugin
- Enqueue sripts and styles only if function is called
- wp_ajax add_action fuction won’t fire on custom jQuery action
- Add function to Dokan ajax class
- 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
- 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
- Template file structure , wordpress hook for altering the template
- How can I see a varibles value when my plugin runs?
- Custom options page for themes
- Call do_action() within WordPress cronjob
- Issues separating my Plugin pages into different files
- WP Custom tables query
- 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