Can you show us what the cp_get_image_url() function does?
Is it from a plugin or theme?
Is the image uploaded to the Featured Image or a Custom Field?
Without knowing what that function is actually doing, the best I could come up with is this:
<?php
$media = get_attached_media('image');
foreach($media as $m) {
$mee = wp_get_attachment_url($m->ID);
echo $mee;
}
?>
This will get all images attached to the Post. So you might end up with a couple of URLs
Related Posts:
- Use image url with add_image_size
- Imported thumbnails have incorrect URL
- How do you retrieve a post by slug name through REST API?
- Why “?v=hash” is added to my URLs? [closed]
- Detecting a WordPress URL without doing a full HTTP GET?
- How does WordPress generate URL slugs?
- How does routing on wordpress work?
- Redirecting to old domain after migration
- Unwanted media library URLs in posts?
- How to remove file versions from the file source links in wp_head?
- Add menu and submenu in admin with a URL instead of slug?
- Update media file url in wordpress media library
- Change logo url link
- Preview Image Path in Admin Section
- Change website URL without breaking links or images? WP 3.3
- Why would image paths in wordpress suddenly change?
- As soon as I add a custom query_var using the filter, my pages point to an archive page – why?
- how to grab first link in post… and of course call it
- @wordpress/create-block image url in css
- Broken urls with http site and https wp-admin
- Password protected page Hash url
- Change code to display image attachment page
- Which of WordPress’s .php files need to be directly accessible via HTTP?
- Remove site root trailing slash
- How to create a page for authors? like www.myblog.com/author/
- Old URL Redirect website after migration
- pass user id in slug and get user information
- Best way to give site sub-page it’s own domain?
- Dynamically change page title from URL param
- What is the correct way to convert the absolute path of the executing script to a URL, in WordPress?
- Getting 404 Hits on URI -/-/-/-/-/-/-/-/-/- . How to deal
- How to change logo url [closed]
- Is it possible to configure WordPress’s Core Files to accept duplicate Child Categories?
- Make homepage a non-WordPress page
- images not showing after transfer
- Avoid the removal of “https:” from URLs
- Content duplication issue with dynamic URLs
- Scrape external webpage for first image and add it to new post
- Is get_permalink also the canonical URL?
- Remove trailing slash from previous_posts_link()
- Moved WP into new folder. How to fix image links in posts?
- Using esc_url_raw with protocols properly
- Site transferred to new server produces 404s
- How to parse a custom url (within WP site) and obtain params passed to that URL
- Change URLs depending on alias
- wordpress copyright dynamic
- How do I avoid messing up URLs when switching from example.com/subdir to example.com?
- Multiple duplicate URL’s
- Made WordPress URL and site address URL the same
- How can i get rid of wp in front of URL
- Using a .pdf file as a page in wordpress
- Dynamic URL and pass the data to an iframe
- DNS – Change WordPress Site Name?
- How to get image URL from media_sideload_image?
- Redirect Image Url to a page via htaccess
- Unicode characters are saved in a funny way in the DB
- Unnecessary url
- How to close tab automatically if URL has specific word? [closed]
- Replace category name with article id in wordpress urls
- Redirect Old wordpress url to new wordpress url
- Finding URI in Child Theme
- Make custom system url
- Sanitizing URL in a WordPress plugin
- How to display translated content with custom slug?
- How to get a page url segment on wordpress?
- How to set wordpress url on local host to access it via VPN
- How to create a user ability to save pages with full url?
- I found weird email address appended to some of my URLs, what does that mean?
- how to remove this #.XsZOUWhKjIU from my wordpress url
- Add more than one query parameter onto wordpress url
- WordPress Website change directory
- Allow duplicate slugs for pages and posts
- How to show a full page when someone links directly to an image on my site
- Cannot Save Changes After Updating URL Settings
- How to encode correclty an url with the char “&” for an email?
- How do i create navigation links like this in wordpress? [closed]
- Blog post Links leading to home page [closed]
- Change dynamically URL to SEO friendly via .htaccess?
- Get userdata from url
- How to make url variable?
- Bypass wp_safe_remote_get()?
- WordPress dynamic subpage for ACF
- From whence %E2%80%8E at the end of post link
- WordPress Address (URL) Reverts back
- wp-login.php ampersand in url results in 404
- How to pass REQUEST_URI to function
- Retrieve first image url from custom post with pagination
- Protocol relative url not pulling up images on IE, FF, and OPERA
- Change path/url of admin-bar.min.css
- wordpress url with format .com/category/sub-category
- Typing local WordPress URL works, but clicking the same link does not
- Images in sub-pages fail to load
- URL Forwarding – wordpress links reverting back
- Get gallery url (Nextgen) [closed]
- How to use query string in URL to display content on the wordpress page
- Block a specific url request
- Replace media external links with local links
- WordPress rewrites my link with custom URL scheme to http(s)
- bloginfo url in javascript
- Show page name after home url