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 can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users > Your Profile page?
- Why does WordPress add 0 (zero) to an Ajax response?
- Passing arguments to a admin menu page callback?
- Where to store PHP files created by plugin / themes
- function deactivate_plugins does not exist
- Understanding WordPress functions’ naming conventions
- Has anyone managed to integrate the wp_editor inside a widget?
- How can I change the frequency of a scheduled event?
- When is it appropriate to put functions on page template vs. functions.php?
- How can i list current author’s categories?
- $wp_filesystem returns NULL. What are the dependencies?
- Problems with removing admin bar
- How to store accumulate multiple option values in a single array using Options_API
- Check if I am in the Admin Panel (wp-admin)?
- What is the Difference between directly call a function and call a function using add_action?
- Call to undefined function get_blog_option()
- Undefined function wp_set_password
- Custom plugin issue when trying to use the shortcode twice on a page [closed]
- New Plugin Review
- Plugin Uninstall and Deactivate via Options Menu
- How can I add a CSS rule to edit.php?
- Making Quote Plugin more efficient
- Scope for PHP Variables Assigned in functions.php or a plugin
- add more custom post types and custom role to the code
- Enqueue scripts in footer
- is user logged in not working
- Override class inside $atts shortcode_atts in WordPress
- add_rewrite_rule works in themes function php but when moved into plugin it stops working
- Where can i find wordpress auto update code flows?
- How to access global variable $menu inside a class function
- wordpress plugin is not activating from widget
- correct way to call javascript into hook function
- how to search users by ajax live search
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- Remove unwanted elements for a wp_nav_menu
- Conditional attributes and logic per product category
- mysql_real_escape_string() vs. esc_sql() in WordPress
- Widget HTML Display Problem
- Checking for existence of a page by title?
- wordpress JSONAPI introspector always limits number at 10?
- how to get context information inside my funcion
- How to modify files inside wp-includes directory in wordpress
- Fatal error: Call to a member function get_page_permastruct() on a non-object
- wp_get_post_terms Order by not working
- Function/Class to list categories with checkboxes
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- WordPress Specified file failed upload test
- How to use html inside a functions.php code?
- Why wp_die() doesn’t work with wp_redirect but exit() works
- Plugin Generate Unexpected output during activation
- execute function after one completed
- Autogenerate a Table of Contents
- Alternative functions for mysql_free_result and mysql_ping in wordpress functions
- Make Database query only when option is updated
- Getting a WordPress Debug Strategy
- WordPress multisite,use same cookies across all website?
- How exclude or skip post type with get_next_post_link
- unregister_setting() vs delete_option() for plugin update
- How to change WooCommerce loop product title HTML output in single product page and archive page
- Overwriting a plugin function
- Writing editor content to a file
- 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?
- Why doesn’t update_post_meta work for certain strings?
- 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()
- Checkbox show / hide output result
- How to Send Pingbacks for all Posts in WordPress?
- Reliable way to add nonce to HTTP Header in WordPress?
- function add custom fields to media gallery
- ssl redirect function is not working
- adding dynamic/multiple slug values in ‘option_none_value’
- Make visible page only in the trash
- 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
- WordPress Ajax not returning Response
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- Remove tag from all posts when publishing new post
- WordPress plugin how to run function when button is clicked
- Is admin section completely customizable in terms of styling?
- WordPress environment not loading properly
- WordPress permalink setting
- Saving an array to get_options
- Permission error on plugin save
- Dynamic banner for use on external sites
- 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?
- Why does this fail: Disabling plugins enqueue_script() in functions.php
- How use Dynamic hyperlink on each wordpress post?
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- display php code in header using wp_head()
- 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?