This code creates a popup widget which you can populate with the Genesis eNews Subscribe widget. When you click the link or button, it darkens the screen and displays the form like you see in the following animated image.
The code works in any theme and is tested in the Genesis Sample child theme by StudioPress.
Widget Setup
Simply populate the Popup Subscribe widget area with 2 widgets.
- A text widget which includes HTML for your content ( sample HTML included ).
- The Genesis eNews Subscribe widget which connects to your email list provider and works in any theme ( including non Genesis themes ).
Code Installation
There’s 5 steps:
- Add the CSS to the end of your child themes style.css file.
- Add the popupform.js file to your child themes js folder.
- Add the PHP code to the end of your child themes functions file.
- Add the HTML code for the link anywhere you like in your theme.
- Add the rainbow-border.png to your child themes images folder
Tracking Clicks
Simply track clicks using Google Analytics New Campaign URL Builder or Simple URL’s
Here’s the code for logged in members:
Was This Tutorial Helpful?