There are a few ways to add your code:
- Using the wp_footer hook.
- Installing a plugin.
- Add it to your theme's existing JS files.
This is the fastest and easiest way to get your custom code setup. This is also the method we use throughout the Popup Maker Documentation.
- Child theme: Add the snippet to your child theme's
functions.phpfile (except for line #1)
- Theme settings: Use your theme's custom code settings or snippets area
Replace or tweak the example code as needed.
Using Simple Custom CSS and JS with Popup Maker
To make sure the CSS or JS you use for Popup Maker works as intended, add your code to the plugin and make sure your Options pane is set up like in the screen capture below.
Keep in mind, when using a plugin like this, you don't need the wrapper that we've provided above when using the
Method #4: Create Your Own Plugin Using Pluginception
Visit the Pluginception WordPress plugin page to get started creating your very own plugin.