Use a custom query for this.
$user_id = 1;
$the_query = new WP_Query( array( 'post_type' => 'attachment', 'post_status' => 'inherit', 'author' => $user_id) );
if ( $the_query->have_posts() ) while ( $the_query->have_posts() ) : $the_query->the_post();
the_title();
endwhile;
This will show all the attachment titles for user with user id 1. You can use get_the_ID()
in the loop to get the attachment ID.
Related Posts:
- How to force Media manager to overwrite files of same name?
- How can I stop WP media uploader from creating duplicates of my uploaded images?
- Adding wp_enqueue_media(); causes problem
- Media Uploader in custom path
- Attach media to multiple posts
- Add attachment for all images in post
- wp.media issue with selected image
- WordPress uploads do not show up and I see the white screen of death in some cases
- How to Fix HTTP Error When Uploading Images?
- Get the first image from post content (eg.: hotlinked images)
- Get url of thumbnail from the media uploader
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- Import media to online WordPress from local development
- get_attached_media() returns empty array if media file already used by another post
- media_sideload_image file name?
- Password protect some uploaded files, so only logged-in users can view them
- Saving Custom Field in Attachment Window in WordPress 3.5
- Plugging into the Media Library to upload images (NOT associated with any post)
- How wordpress handle upload images and how to use them in the code
- Doubled titles when using All in One SEO with custom template
- How can you determine whether an image is merely attached or has actually been inserted into a post?
- How to regenerate thumbnails when they’re stored on S3
- Adding File Extensions to Attachment Page Permalinks
- How can one update a theme on a live site without interruption?
- How to upload images using Settings API
- How to retrieve alt attribute for an attachment (uploaded image)?
- trying to use wp_handle_upload with ajax
- How to add a download link to a movie from WP media library?
- Featured Images are not able to be set
- Customizer: Unique identifier that distinguishes which image upload control is uploading an image
- attachment.php code or tutorial
- Unable to check if image uploaded by wp_image_editor exists using file_exists function
- How can i attach the attachment-ID to the user profile image?
- Fetch wordpress video attachment with post ID
- WordPress Media Uploader in page template (On Front-end)
- problem in uploading attachment to custom directory
- Can I get the ID of an inserted / linked image?
- Redirect to another page using contact form 7? [closed]
- How to load attachment in media library for current user?
- Getting Different Size Of Attachment Images
- Can I add an icon & function to the “Upload/Insert” toolbar at the top of the content editor?
- zip unzip attachments in wordpress
- Get images attached to a specific page
- Is it possible to determine when user is at “Media > Add New” vs “Post > Add an Image”
- Is There A WordPress Hook for Accessing Attachments for A Particular Page?
- WordPress creating images if uploaded image is greater than 960px on one side?
- Callback Function Not Firing On Selection In Media Uploader
- Upload multiple image with media_handle_upload with multiple file field [duplicate]
- Using the media library for theme customization
- View list of all attachments on site
- HTTP Error when uploading images over specific dimensions
- Theming media inserts
- “The REST API did not process the context query parameter correctly.” Custom theme conflicting with Media Library
- What is wrong with my wp_insert_attachment code?
- Adding attachment custom field metadata to TinyMCE tag
- How to make the media library searchable by image title
- How to destroy or dispose wordpress uploder/manager?
- Can’t upload images on new theme
- controlling whether upload is attached to post or not
- How to store and retrieve the attachment alignment?
- Change default options on attachment page
- Attachment Metadata not updated while uploading audio files
- How to force unlink on attached/inserted images?
- Custom Theme functions.php – Using add_settings_field and input type=”file” to set custom logo
- Is there any halfway decent documentation on the wp.media JS class?
- How to add posts to custom menus?
- How to remove search bar from a wordpress theme? [closed]
- Page attribute template dropdown not displayed even the syntax is correct
- How to add a text widget during theme activation
- Fatal error: Call to undefined function get_header()
- Using the component outside the editor. select(‘core’) is null
- Add a theme via symlink
- How to determine which registered sidebar area a custom widget is loaded into
- Insert attachment ID in custom field from media uploader
- Including wp-blog-header.php from functions.php remote call?
- Administration Pages Styling
- Custom button block doesn’t work
- How can i convert the figma design into wordpress [closed]
- Display div only on the HOMEPAGE
- WordPress is adding margins and padding to my custom menu?
- Keep sticky posts out of query unless they have featured image
- Is It Possible to Upload Certain Attachment Files To A Remote Server
- How to control on which pages the Aldehyde theme’s main slider is shown?
- WordPress stylesheet isn’t being added
- Forms won’t submit
- How to add pages in wordpress using codes?
- How does the loop know which post to view?
- Filter causing loss of _wp_attachment_metadata
- How to know if I am on 1st page
- How to create a robust and logic class naming system in WordPress theme developing?
- WordPress append -1 to the image name
- get currently showed author ID in theme functions.php
- Customizer API way function is_customize_preview() works only in main page?
- using theme check plugin to remove waring and errors from my theme
- paragraph format in WYSIWYG on a custom theme?
- unable to display the image meta value as background
- editor style css and page template with and without sidebar
- How to determine if it is legal to remove credit link from theme?
- How to create sub-menu in “Allure Real Estate Theme for Placester”?
- Upload to a specific media folder created by FileBird Lite