Create Popup window

Here is how to create a POPUP window in WordPress with a content of your choosing.
For the popup we need a Page w/o a theme, so let’s do this :

  • Install the “Blank Slate” plugin.
  • Create New Page
    • Leave the Title empty
    • Set in Page property Template=”Blank Slate”
    • Add whatever content you want
    • Because there is no Title, we need set a Permalink so that it is human readable, let say : your-site/blah
    • Publish the page
  • Go to the page you want to have the popup window show up when you click a link
  • Add the following code :
<a href='' onclick='window.open("https://your-site/blah/","window-name","width=400,height=320");' target='blank'>Popup window</a>

If you have an original element to hide use this, so that it looks like the element pop up from the page :

<a href='' onclick='window.open("https://your-site/blah/","window-name","width=400,height=320");document.getElementById("orig-blah").style.display="none";' target='blank'>Popup window</a>

Here is it in action : [Learn Python]