- Why Create Remote Content Popups?
- Before You Start
- 1. Create a Popup
- 2. Add a Remote Content Area
- 3. Choose Your Remote Content Area Settings
- 4. Save Your Remote Content Area Settings
- 5. Make a Click Open Trigger
- 6. Save Your Click Open Trigger
- 7. Save and Enable Your Popup
- Take a Test Drive
- Troubleshooting
This beginner’s guide to remote content popups takes you through each step of creating a popup that loads content from a URL when you click a link.
Why Create Remote Content Popups? #
Have you ever wished you could automatically reuse content from different parts of your site in a popup? Not only would that save time from writing the same thing twice or having duplicate content, but your page speed improves because the content loads only when it’s needed!
In this article, you’ll learn how to create a popup that grabs content from anywhere on your site via a URL. This allows you to automatically create custom popups using existing posts, pages, or parts of a post/page. What’s more, is that the content only gets loaded if the popup launches (improving precious page speed).
Before You Start #
Our premium Remote Content extension makes loading a popup with content from a URL possible. So, you’ll need the Remote Content extension installed and activated before you start.
Follow these steps to make your first Remote Content popup.
1. Create a Popup #
To create a popup, click Popup Maker > Create Popup in your WordPress admin area.
2. Add a Remote Content Area #
From the popup editor’s toolbar, click the Popup Maker icon. Select Remote Content Area.
Next, you’ll see the Remote Content Area General settings modal window.
In the General settings tab, you’ll have the following options:
- Choose the method used to load dynamic content
- Content CSS Selector
- Loading Icon Style
- Minimum Height
Let’s cover each option.
3. Choose Your Remote Content Area Settings #
Choose the Load From URL Setting #
Under the Choose the method used to load dynamic content heading, the Load From URL option is the default. Keep that setting.
Content CSS Selector (optional) #
The Content CSS Selector setting lets you control what part of your post or page gets loaded into your popup.
To select or filter what content from the URL to load into the popup, type a valid CSS selector into the Content CSS Selector input field.
If you don’t fill in the Content CSS Selector field, the entire post or page from the URL loads by default. That includes the header, menu, body, and footer for the post or page.
Using the earlier screen capture as an example, the popup will load the content that’s only in the .entry-content
section of the post or page.
Loading Icon Style #
A loader animation icon will display while the remote content loads into the popup. The default animation icon is called Lines: Growing.
If you want to change that, click the dropdown and select the loading animation icon you want to appear instead.
Minimum Height #
The default Minimum Height is set to 200px. To change that, you can:
- Drag the slider to the right or left to increase or decrease the height
- Enter the number of pixels into the input field
- Click the + or – button to increase or decrease the height
4. Save Your Remote Content Area Settings #
Click Save when you’re done.
5. Make a Click Open Trigger #
Follow the steps in our Add a Popup Trigger guide to create a Click Open trigger. In your Click Open trigger, you’ll need to add a link CSS selector. Here’s how.
In the Extra CSS Selectors input field, click on the left arrow icon to see the link options.
Click Link: Exact Match from the dropdown.
Change the placeholder in between the double quotes (“) to the link you want to launch and load into the popup.
In the screen capture below, the popup will do 2 things:
- Launch when you click the
http://twenty-twentyone.local/about/
link that’s on a post or page - Load the contents from the
http://twenty-twentyone.local/about/
URL.
6. Save Your Click Open Trigger #
Click Add to save the trigger settings and add the Click Open trigger to your popup.
7. Save and Enable Your Popup #
Click Publish or Update to save your popup’s changes. Enable your popup if it isn’t enabled yet.
Done! Let’s test the popup next.
Take a Test Drive #
Here’s how to test your new Remote Content popup.
- Add a new (or edit) post or page.
- Insert a link.
- Edit the link so that it’s the exact same one you used for your Link: Exact Match trigger setting.
Continuing with our example, we’d add the http://twenty-twentyone.local/about/
link to our post or page.
Visit your post or page after you’ve saved your changes and click the link.
If everything works, you’ll see the animation icon and then your popup with the content from your URL!
Troubleshooting #
My content doesn’t load #
- Remote Content Area General settings: Make sure you have Load from URL selected and your Content CSS Selector is correct. In our example, the
.entry-content
CSS class must be in the post or page that’s loaded. If it isn’t, we’ll get a blank popup. - Click Trigger settings: Check that you have the right URL in your trigger’s Extra CSS Selectors setting. If you’re trying to load your about page, but the URL has “/baout” instead of “/about”, the content won’t load.
- Link in post or page: The link you put in your post or page must exactly match the URL you have in your Click Trigger settings. If your Click Trigger has
http://abcdef.com
but your post hashttp://abc123.com
your popup won’t launch.
My popup doesn’t appear when I want it to #
- Published and enabled: First, make sure your popup has the content you want and is published and enabled.
- Targeting conditions: Next, check your Targeting settings to make sure you haven’t accidentally excluded your popup from showing. Here’s our help guide for checking your Targeting conditions.
- CSS conflict: Sometimes, another (existing) CSS rule can block your popup. When that happens, it’s called a CSS conflict. The simplest way to fix a CSS conflict is to add a CSS rule to force your popup to appear. Follow our step-by-step instructions to add the CSS rule that will fix the conflict.
Advanced Troubleshooting #
Visit our main troubleshooting page for more advanced help guides.
Getting Help #
If you need help with your popup, we’re only a click away.
Head over to our support page to submit a ticket, join our Facebook group, or check out all of our resources.
Do you need to load external content in an iFrame instead?
Read our How To Create a Popup That Loads External Content in an IFrame guide next!