I’m not sure if this is exactly what you’re looking for, but you might want to check out: get_attached_media() and wp_get_attachment_url().
Related Posts:
- Loop through all media library images and return those where caption contains the text carousel
- Get link of inserted media file of post within loop
- change the_content images for different sizes (Desktop, tablet, mobile)?
- How to Protect Uploads, if User is not Logged In?
- Counting the posts of a custom WordPress loop (WP_Query)?
- Enhance Media Manager for Gallery
- Get post content from outside the loop
- Is it necessary to reset the query after using get_posts()?
- Is there any difference between the_title() and echo get_the_title()?
- How to wp_upload_bits() to a sub-folder?
- Is it possible to trigger some JavaScript when Media Popup is opened?
- Pagination not working on home page
- 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
- Get ID of a page containing secondary loop in content
- 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?
- Display subpages under parent page as a list within a loop
- When to use wp_reset_postdata();
- Exclude category by slug for for each loop
- Previous and Next Post link doesn’t work
- Random post, page inside post loop problem
- In a foreach loop, how do I target the last item in the loop?
- Users instead of posts: How to modify the main query?
- Different upload path per file type
- single page site with subpages
- Different Queries Return Same Results [closed]
- wordpress simple loop, huge issues
- Pagination gives extra page with no results
- Add instructions For Media Library Uploads
- Better way to display posts from specific categories, in a grid layout
- Infinite Redirect Loop after moving to subdirectory
- WordPress Loop – Not returning projects in specific category
- Next and Previous loop
- Query reset problem or flawed code to enable custom post type query
- Exclude posts from main loop based on meta value
- how to upload file to media library using link [closed]
- trouble calling an import class from an action in a plugin before wp_cron executes
- Blog page Server error 500 with stick post loop in query.php
- How can I paginate this?
- Obtain page data and use regular loop
- How can I load posts starting from, and including, the current post?
- Media Manager (since 3.5): How to show an empty Media Library when creating a media frame?
- How to fix pagination for custom loops?
- Show all posts using the template page and the loop?
- ‘Auto Draft’ Post showing in wordpress loop
- How do I display an image before the first post of the loop when I’m using get_template_part?
- Multiple get_posts() queries on one page
- Change date format
- Custom loop not working
- In Custom page – next_posts_link Not working while previous_posts_link is working
- Escape current post from loop
- Why isn’t my multiple loops working?
- How can I display other user avatars on an author profile page?
- How do I display the latest posts from three different categories?
- facebook like, tweet and google+1 buttons inside the loop on home, archive and search pages and missing facebook like buttons
- Loop Offset for tag based “Related Posts”
- Is there a way in WordPress to convert images to WebP without a plugin?
- How do I put my frontpage featured image in a page template for home.php?
- Randomly display post based on meta value. (Kind of Priority/Weight)
- How to print redux gallery feilds id? [closed]
- Why the first with flexslider appears as blank on my code?
- Rendering pages
- How can have a conditional template tag based on the main loop within a secondary loop with new WP_Query(), using get_template_part()
- Reset Loop get_posts();
- WP_Query is only looping home page, not pages
- How to filter posts by category INSIDE the loop
- static page with multiple loops breaks post pagination
- Attaching images to multiple galleries
- Help with if and else statement
- Custom Header added within Dashboard pages, is this possible with custom template files?
- Loop order issue with Ajax filter
- WordPress append -1 to the image name
- Attaching a file to a page without adding to media library?
- Adding a second loop breaks everything
- Custom Query with Sticky Posts
- Front-End Upload media with category
- is it bad to copy the loop for a template?
- I want to load post in bootstrap Modal dynamically
- Change default ‘file not supported’ error message
- Return only one post format in index.php [duplicate]
- How to display just video post format?
- Is it possible to get a post ID of a 2 different custom post types loop embedded in the same post to perform update_post_meta from the frontend?
- Modify widget to output posts in custom order
- How to execute custom loop before loop content?
- Sorting posts to make those with post thumbnail show up first
- Best way to check if a post with specific meta exists
- Limit article to 100 characters. Can’t use the_excerpt…
- Return only content in excerpt field in loop
- Default Template infinite loop of Title
- This webpage has a redirect loop issue with SSL page
- Buddypress Group Activity Loop Filter activity type [closed]
- get_posts and wp_autop (remove filter)
- Trouble preventing duplicate posts between 2 loops on homepage
- $do_not_duplicate is not working in genesis theme
- Loop displays current page
- Error in Wordprewss loop for page template [closed]
- Tags outside the loop
- I make sticky post for my archive page for custom post type with ACF field and loop is not working