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
- Convert base64 string to WordPress attachment uploads multiple images instead of a single one
- 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?
- get main URL from subdirectory with php
- style variations hurt the editing performance
- How to copy page/post from one theme to another?
- Not sure how to debug this npm install error. This is a wordpress theme that comes with a built-in gulp/webpack task automation [closed]
- How to update mark-up of a gallery block in a custom theme?
- How to upload large media file in chunks, without any plugin?
- How to locate the js code and php code for certain function?
- wordpress script_loader_tag in function.php
- PDF Upload from Input Error
- How to get URL of category of a custom post?
- PHP Parse error: syntax error, unexpected ‘endwhile’ (T_ENDWHILE), expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) on line 124
- Using WP-CLI “wp media import” to sync files to the media library
- Show only pages you are author of
- Cannot create new posts or upload images using media manager
- Best way to implement bootstrap after loading
- Hide media library images from other roles uploaded by admin
- Auto focus RichText field
- Wrong activation/confirmation link in email
- How to create nested array attribute
- How to change listing type permlink?
- Category-specific loop not working
- Show popover with url and option to open in new window
- Require once a general library
- Catch the moment when theme is deleted
- Is it possible for the enqueue styles function to mess up my CSS?
- Child theme’s style.css is loaded twice
- How to Modify WP_Includes/blocks/latest_posts.php
- Unexpected behaviour of class_exist
- Efficient way to move media folder to another folder
- Adding popup support to the theme
- Do custom post type (CPT) attachments/media store the parent post ID?
- How to create a robust and logic class naming system in WordPress theme developing?
- WordPress append -1 to the image name
- submit two file input fields in the same form