What is a shortcode? Back to top

A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. Shortcode = shortcut.

Lightbox shortcode Back to top

The shortcode looks like:

[lightbox href="image.jpg"]Example[/lightbox]

Examples

  1. Single Image
    [lightbox href="http://domain.com/image.jpg"]Open Image[/lightbox]
    
  2. Advanced Examples
    [lightbox href="http://domain.com/image.jpg" width="400" height="300"]Open Image[/lightbox]
    
    [lightbox href="http://domain.com/image.jpg" width="400" height="300" modal="true"]Open Image[/lightbox]
    
    [lightbox href="http://domain.com/image.jpg" modal="true" autoresize="false" title="Example"]Open Image[/lightbox]
    
  3. Videos
    [lightbox href="http://www.youtube.com/watch?v=eBGIQ7ZuuiU"]Open Youtube Video[/lightbox]
    
    [lightbox href="http://vimeo.com/13240711"]Open Vimeo Video[/lightbox]
    
  4. Iframe
    [lightbox href="http://www.google.com/webhp?hl=en&tab=nw" iframe="true" width="700" height="460"]Open Google[/lightbox]