As featured on netchunks.com
Here’s my first WordPress plugin; blood, sweat, and tears have gone into making this simple thing. The function of this plugin is to easily create a simple popup window like so.
I figure there’s got to be a bunch of bands/musicians using WordPress that need an easy way to create a popup music player to showcase their songs without having visitors go to a separate page of the site.
*This plugin is compatible with WordPress 2.8 and above.
- Download and install/activate this Simple Popup plugin.
- Adjust settings in the options page.
Create a popup link in by using this shortcode within the post or page editor:
- url = ‘*The url you wish you popup. The only required attribute.’
- width = ‘The width of the popup in pixels. Overrides the width set in the options screen.’
- height = ‘The height of the popup in pixels. Overrides the height set in the options screen.’
- class = ‘Add a custom class to the link (simple_popup_link is added to each link by default)’
Popup Links in Template Files
If you would like to use the shortcode in a template file simply call it like so:
<?php echo do_shortcode('[popup url="http://popupurl.com']LINK TEXT[/popup]'); ?>
An image can be used as the link as well:
<?php echo do_shortcode('[popup url="http://popupurl.com']<img src="http://imageurl.com/image.jpg' />[/popup]'); ?>
2/23/09 – Version 2.0 – Now has an option for toggling scrollbars, a widget for easily adding a link to the popup in your sidebar, and a template tag for adding a link wherever else you might want one! Roll it!
11/1/09 – Version 3.0 – Added support for multiple popup links. Now has the option to position the window on the screen. Removed widget.
11/3/09 – Version 3.1 – Brought back widget with easier usage!
1/15/10 – Version 3.2 – With the help of Rich added ability to use multiple popups in the widget and window centering support.
8/17/11 – Version 4.0 – Added the ability to change dimensions of individual popups via width & height attributes in the shortcode. Also added a ‘class’ attribute so you can add a custom class to the link if desired.
5/25/13 – Version 4.2 – Fixed issue of toolbar/scrollbar/location bar options not working correctly.