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 .html (dot HTML) extension to 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
- set_post_thumbnail_size in percent, not pixels?
- URL for custom post type
- Custom post type Admin Page
- WordPress Custom Post Type Category Page
- Best Way to Leverage Custom Post Type Related Content and Consider SEO
- Change the url of Projects in Divi Theme
- Image size filtering in Media uploader according to custom post type
- Count all images of a certain post type
- Stopping WordPress from Auto Generating Image Files for Sizes
- Uploaded image not appearing in custom post type
- 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%
- Issue to get wp_get_attachment_image with cmb2
- How to rename image at uploading on specific plugin or post-type in WordPress
- How to insert multiple images into a single post within a CPT
- How do I get the permalink structure to work like this?
- List all images from a single post meta value
- How to detect filter in URL in Category page?
- Get image post ID in media upload
- Hide editor while keeping add media button in custom post type
- Custom Post Type with image gallery
- Multiple featured sizes / images / excerpts
- Custom Post Types, URL rewrite on multiple CPTs
- can I chage url for register_post_type
- Front custom edit post page for each post
- How to build custom route by adding taxonomies to URL ? ex: www.demo.com/communities/palo-alto/
- Remove the parent slug in a CPT URL
- create a subcatagory for a custom post type and out put url as posttype/subcategory/item
- Rewrite Question Mark in Post Template to Make it Pretty URL
- Changing the search url according to language
- WordPress randomly shows 404 errors
- frontend image post uploader
- Adding custom image sizes and post types to a plugin or to a theme?
- 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]
- How can i link a custom post type thumbnail to intermediate size
- retrieve permalinks of posts inside custom post type by using post ID
- custom endpoints on Custom Post Type return 404 page not found
- 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?
- 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?
- Custom Post Type URL Rewrite’s
- Should i use custom post type for a custom footer?
- Custom post type items open in archives?
- 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
- URL for archive of custom post type with 2 taxonomy terms
- How can I add image sizes for a specific custom post type?
- Modify Url for Edit Post Screen in Custom Post Type
- Add %post_id% to slug of custom post type and prevent the “unique slug” thing that WP does?
- Turning archive templates to a page template maintaining the slug
- Dupplication of Custom Post Type while adding attachment
- Multi Photo Upload with Caption on Front End for Custom Post Type
- How to display a custom post as a page (but unedited)?
- WordPress Custom post type slug rewrite
- How to manage a custom post type archive as a page?
- Unwanted URL with Custom Post Type
- Links Image in “Catalog” Page to Posts
- Single Post (CPT) in two pages – Normal and Extended
- Remove wp directory and slug for custom post type from the URLs
- Do not output category and tag URLs
- How do I set a specific size for my image?
- Trying to get custom post type attachment images to function in indexed array
- Custom post type clean url
- Get full control over custom post type url
- How to switch from custom post type URL to category URL?
- Custom Post Type Categories Not Maintaining URL structure any more
- Image paths on custom post types getting /post_type/ added to path
- Category slug not showing for Custom Post Type
- Cannot get query var ‘post_type’ to work
- Why are my wp urls showing page not found?
- Sorting custom post types by taxonomy (So close)
- Retrieve post data via WPDB class
- Removing custom post type name in single article URLs
- create gallery page for specific post id
- Creating additional page with own URL for each custom post
- WordPress pagination URL
- Add a background image into a post [closed]
- Front end post or photo or both
- Links in archive not including taxonomy parameter
- Hide custom post type slug url from search engine [closed]
- Custom post type with custom taxonomies structure url not working archive of CPT
- set_post_thumbnail or media_sideload_image adds image multiple times in media library
- Rewrite rule taxonomy url with different values in one function
- How do I get parameters from the URL?
- How to Create Grey Background for Product Images on Website Display but Retain White Background on Downloaded JPGs?