Add this following function to your functions.php of your theme or child theme.
function homeURLshortcode()
{
return home_url();
}
add_shortcode('homeurl', 'homeURLshortcode');
This will create a shortcode like [homeurl]
which you can use to add in any visual editor and it will render as your main domain address, like http://domain.com.
So for your image url you need to add [homeurl]/wp-content/uploads/2018/05/video-popup.png
Related Posts:
- link featured image to external link
- Remove slug from custom post type post URLs
- add_image_size() for specific Post Types
- Creating an Image-Centric Custom Post Type?
- Add .html (dot HTML) extension to custom post types
- How to disable generation of default image sizes for some custom post types?
- Possible to change the URL for the regular post type without affecting the URL of other custom post types?
- Use a separate upload folder for custom post attachment upload
- Why does my custom WP role need edit_posts to edit images?
- How to give a CPT (custom post type) a date based url
- List most recent image uploads, but only for specific custom post type
- set_post_thumbnail_size in percent, not pixels?
- How to add a CSS class to every image in a Custom Post Type
- URL for custom post type
- Custom post type Admin Page
- Custom Post Type Archive URL takes over page URL
- WordPress Custom Post Type Category Page
- How to Add Pages Under Custom Post Type URL Structure?
- Best Way to Leverage Custom Post Type Related Content and Consider SEO
- Extract image src from a post and send it to an external form
- How to have a custom URL structure for a custom post type?
- Pagination throws 404
- Change the url of Projects in Divi Theme
- Removing Image Sizes for Custom Post Type
- Creating multiple page URL without creating the pages in WordPress
- WordPress custom post type url change
- Image size filtering in Media uploader according to custom post type
- remove post-name from title in custom post type
- Count all images of a certain post type
- How to get source of custom meta image?
- Stopping WordPress from Auto Generating Image Files for Sizes
- Uploaded image not appearing in custom post type
- Return Attachments from Custom Post Type
- Rewrite Custom Post Type URL slug
- How to get category image custom post type taxonomy in wordpress?
- add_image_size for post type
- Get a permalink structure of /%posttype%/%category%/%postname%
- Set Custom Image Size Just For Specific Custom Post Type
- Issue to get wp_get_attachment_image with cmb2
- How to rename image at uploading on specific plugin or post-type in WordPress
- CPT posts listed by category with custom rewrite URL, please help!
- How to insert multiple images into a single post within a CPT
- Adding class to featured image
- Change post featured image on hover
- How do I get the permalink structure to work like this?
- URI returns a post when it should return a 404
- Query string parameters from custom fields, inconsistent results
- Query var removed after rewrite
- List all images from a single post meta value
- Bizarre Permalinks Issue: 404 Errors Everywhere
- Custom Image Thumbnails of Different Sizes
- How to detect filter in URL in Category page?
- How to move image thumbnails into custom folder for custom post type
- Custom Post type and permalink settings
- uploading images to specified directories
- Changing the search url according to language
- WordPress randomly shows 404 errors
- Problem: wp_query outputs all images on site
- non-hierarchical post type with hierarchical url structure
- Problems with image size on the server WordPress
- frontend image post uploader
- Adding custom image sizes and post types to a plugin or to a theme?
- Taxonomy in URL
- Best structure / rewrite rules to achieve the following url
- How to handle large number of images in a post?
- How do you get the full size url of an attachment image
- Redirect to another page using contact form 7? [closed]
- CPT category hierarchy
- How to add multiple images to a custom post type without plugin [closed]
- Create Custom Post Type as page
- How can i link a custom post type thumbnail to intermediate size
- retrieve permalinks of posts inside custom post type by using post ID
- Is it possible to add posts and images (auto resize) for custom post types with a script?
- How does: /index.php?post_type=event&event-date=2011-07-25 work? What if it doesn’t work?
- How to create connection among state, city, store and store number based on URL
- custom endpoints on Custom Post Type return 404 page not found
- Custom Post Type Category URL
- How do you output an unknown number of images in a custom post type with desired markup?
- copy images from custom field to another custom field
- How to create custom search result page with custom URL parameters for custom post type?
- Sanitize title only if only custom post type
- Using Image Sizes for Custom Post Types outside the Loop
- How to display wp_post by custom field value?
- Custom post type URL
- How to add page under a custom post type?
- Changing custom post type URL issue
- Custom Post Type URL Rewrite’s
- Post/Custom Post Type URL Access
- Thumbnails Not Generating
- Should i use custom post type for a custom footer?
- Returning an image url from its attachment ID using a custom post type plugin
- Custom post type items open in archives?
- Images not load on custom post type sidebar, related posts
- Not Able to Add New Class To CPT Attachment Image
- returning the currect URL for nested posts
- how to achieve this permalink abc.com/CPTName/CustomPostTypeCategorySlug/categoryname
- I want to rewrite the URL of a specific post with a specific custom field to easily analyze in Google Analytics
- Preview url not working outside wp-admin
- DIVI Theme customizer changes not applied on existing pages and designs are not shown on the front
- URL for archive of custom post type with 2 taxonomy terms