You could do this pretty easily with a simple query:
global $wpdb;
$results = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE meta_key = '_wp_attachment_metadata' AND meta_value LIKE '%carousel%'");
foreach($results as $result){
//$result->post_id will give you the original attachment post
}
Related Posts:
- Access to Media Library
- Get link of inserted media file of post within loop
- change the_content images for different sizes (Desktop, tablet, mobile)?
- How to fix pagination for custom loops?
- How to Protect Uploads, if User is not Logged In?
- Jquery Slider for profile template
- Counting the posts of a custom WordPress loop (WP_Query)?
- Add a menu item to WordPress 3.5 Media Manager
- if ( is_home() && ! is_front_page() )
- Get excerpt using get_the_excerpt outside a loop
- How to Fix HTTP Error When Uploading Images?
- How to display Yoast SEO meta description in archive template for each post instead of the_excerpt()? [closed]
- Enhance Media Manager for Gallery
- Get post content from outside the loop
- Why should I put if(have_posts()), is while(have_posts()) not enough?
- Display featured products through custom loop in woocommerce on template page
- Split Content and Gallery
- How to get Author ID outside the loop
- Extend Media Library
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- Delete an attachment in the WP media modal window
- How can i display the content in plaintext
- Upload images to remote server
- Redirect loop when trying to login to /wp-admin/ [duplicate]
- How to split a loop into multiple columns
- Is it necessary to reset the query after using get_posts()?
- How to show all available images in WP’s media library when using the Polylang plugin?
- Is there any difference between the_title() and echo get_the_title()?
- Media library to list images only user uploaded
- AJAX with loop filtering categories
- WordPress 3.5 Media Manager – add a button
- Do I need to use The Loop on pages?
- Remove the Homepage Query
- Rendering the uploaded file in a wp.media object
- remove tags from the_content
- How can I bulk delete media and attachments using WP-CLI?
- the_title() shows title of the first post instead of the page title?
- How to force excerpts / teasers in the loop
- Remove “Insert from URL” link in Media upload – WP 3.5
- Which filters or actions to use after a media upload and delete?
- How do I force WordPress to show most recent version of images in the media library?
- Retrieve each widget separately from a sidebar
- WordPress Media Manager 3.5 – default link to
- Proper way to add a button to the top menu of the media library?
- Why am I being limited to ten posts on a custom loop?
- Should I use loop in the single.php file?
- Protecting direct access to PDF and ZIP unless user logged in (without plugin)
- How to wp_upload_bits() to a sub-folder?
- A search for ‘0’ returns results
- Filter by post category in Media Library
- Change Media Uploader default directory
- display image size in media library screen
- Why do themes rely on “The Loop”?
- How to hide media uploads by other users in the Media menu?
- How to return loop contents
- Using the Loop to show all levels of subpages under a parent page? Halfway there
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Cleanest Way to Select Every Second Element in a Loop?
- Where do the favicons for Media Files come from
- Update media file url in wordpress media library
- How to capture the selection:toggle event fired by wp.media
- Insert image or ad script after 3 posts using the loop
- Is there a user-facing interface to edit an attachment’s permalink?
- Get date of last update outside of loop
- Is it possible to trigger some JavaScript when Media Popup is opened?
- Pagination not working on home page
- Child Pages Loop
- How to call WP3.5 Media Library manager?
- How to place comments_template(); outside the loop?
- Multiple Loops Homepage?
- Creating a metabox to upload multiple images, Ignoring The Featured Image
- Hide old attachments from wp media library
- How to Change Loop to Order Posts by Views (using wp-postviews plugin)
- Get all posts (of any post type) an attachment is used in
- Changing the media library default tab
- how to upload image using wp_handle_upload
- Avoiding using a loop to access a single post
- How to get the first image gallery of a product in woocommerce in a loop
- Get post by page name or slug
- Password protect some uploaded files, so only logged-in users can view them
- save_post + insert_post = infinite loop
- Attach Files Metabox
- How to extend LINK TO functionality in ATTACHMENT DISPLAY SETTINGS
- How to protect uploads in multisite if user is not logged in?
- Loop.php vs looping inside template file
- Get ID of a page containing secondary loop in content
- Unattaching unlinked images
- Custom Loop and Infinite Scroll
- Hook for image edit popup
- Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
- Best plugin to manage media library? [closed]
- is_home, and is_front_page conditional problem
- Is `query_posts` really slower than secondary query?
- Are there any scenarios where the query_posts may be used?
- the_content and wp_link_pages
- How would I go about listing only unattached media in say a sidebar?
- Append button to WordPress Image Details modal
- Adding ‘current_post_item’ class to current post in the loop
- How do I get the attributes of a short code from a post?
- How can I custom order the results from wp_list_categories?