Embed any external content on a Page, Post, or Custom Post Type without the need to use complicated domain forwarding or domain masks.
Content Mask allows you to embed any external content onto your own WordPress Pages, Posts, and Custom Post Types. The end result is fairly similar to setting up a Domain Mask, but the content is embedded into the front end of your website and is fully contained inside your WordPress permalink ecosystem.
Example: If you built a landing page on
landing-page-builder.com/your-landing-page/
, you can simply create a new Page on your website atyour-site.com/landing-page/
and paste in the URL of your landing page. The Content Mask plugin will then download and cache of copy of your landing page directly on your website, so any visitors that come toyour-site.com/landing-page/
will see the landing page you built. This allows you to keep all of your links integrated into your WordPress Website.
† Do not use Content Mask to embed any content that you do not own or do not otherwise have license to share, embed, frame, or distribute.
With a simple 2-Step UI, you can embed any external content into your website without any complicated URL Forwarding, DNS Records, or .htaccess
rules to mess with.
Just enable the Content Mask on any Page, Post, or Custom Post type by clicking on the check mark.
Then put in the URL that contains the content you want to embed.
It’s that simple!
Using the Download method (default) will fetch the content from the Content Mask URL, cache it on your website, and replace the current page request with that content. By default, this cache lasts 4 hours – but it can be changed anywhere from “Never Cache” all the way up to “Cache for 4 Weeks”. Caching prevents the need for additional requests that slow down your site.
Using the Iframe method will replace the current page request with a full width/height, frameless iframe containing the host URL. This method is ideal if the URL you want to embed won’t serve scripts, styles, or images to other URLs or IP Addresses. If you use the Download Method, and links or images look broken, you can try the Iframe method instead.
Using the Redirect (301) method will simply redirect the visitor to the host URL.
In the Content Mask admin panel, you can enable tracking for Content Masked pages. This will allow you to see how many visitors are viewing these links. This is ideal for when you need to track acquisition, such as on a Landing Page.
Do NOT use Content Mask on any content you aren’t explicitly authorized to share or use. Please confirm you’re allowed to utilize and embed the content before embedding any particular URL.
Content embedded using the Download method is cached using the WordPress Transients API for 4 hours by default. If the content on the external URL is updated and you would like a fresh copy, you may just click the “Update” button on the Page, Post, or Custom Post Type to refresh the transient, or click the “Refresh” link in the Content Mask Admin panel. You may also change the cache expiration timer per page anywhere from “Never” to “4 weeks”.
You may use the Transients Manager plugin to manage transients stored with the Download method. All Content Mask related transients contain the prefix “content_mask-” plus a stripped version of the Content Mask URL, such as “content_mask-httpxhynkcom”.
‡ Your site may be prevented from processing page requests for any reason; Reasons include, but are not limited to: masking unauthorized content, at the request of the masked URL site owner, masking hateful content, masking illegal content, circumventing IP bans, etc. A dual one-way encrypted hash of your masking URL may be used to check for infraction. No identifying information will be used for this check, and no information is saved other than as a transient to prevent unnecessary duplicate checks per site
Upload the content-mask
folder to your /wp-content/plugins/
directory.
Activate the “Content Mask” plugin.
How to Use:
Edit (or Add) a Page, Post, or Custom Post Type.
Underneath the page editor, find the “Content Mask Settings” metabox.
Click the Checkmark on the left to enable Content Mask.
Paste a URL in the Content Mask URL field.
Choose a method: Download, Iframe, or Redirect (301).
Update (or Publish) the Page, Post or Custom Post Type.
That’s all! When a user visits that Page, Post or Custom Post Type, they will instead see the content from the URL you have put in the Content Mask URL field.
Enable the Content Mask with the Checkmark - Put in the URL of the content you would like to embed. Done! Optionally, choose a different method (Download, Iframe, or Redirect). If using the download method, you may also change the cache duration from never up to 4 weeks (you may refresh the cache at any point manually).
The Content Mask Admin Panel shows a list of all Content Mask pages/posts and their current settings. Quickly enable or disable the Content Mask with a single click on the Method icon. The cache may also be refreshed from this page. You may also enabled/disabled Vistor Tracking that shows how many times each Content Masked page has been viewed. Only pages/posts that the current user can edit are displayed.
The regular WordPress page content, without Content Mask on.
The same WordPress page with Content Mask enabled and set to https://example.com/. You can see the URL has remained the same but the content has been entirely replaced (on the front end only) by the content from https://example.com/
Content Mask caches the masked page to your website. Click “Update” to resave the page, or click the “Refresh Transient” from the Content Mask admin page. If that doesn’t work, you can add a query string to the Masked URL, such as https://example.com?1
and Content Mask will fetch a new copy.
No. If this is a feature you would like implemented, please contact me.
No. This is because of how page requests are processed. Using Content Mask will override the entire page content on the front end.
No. There’s not currently a way to embed multiple URLs onto a single page. You can embed one URL on one page.
No. Content Mask does not permanently alter anything on your website. The embedded content is only shown on the front-end. When you turn off Content Mask, any page content you had in the editor will still be there.
Some websites “whitelist” IP addresses or domains for scripts, images, and files to be accessed from. If that’s the case, try using the iframe method instead.
Some websites don’t allow themselves to be iframed at all. Please reach out to the webmaster for the content you wish to iframe.
If your website is secured (with https://), make sure any links on the iframed page are secure as well, as most modern browsers don’t allow insecure content (http://) to be loaded into a secure page or iframe.
post_type_XYZ_checked
dynamic variableedit.php
admin base screen.