[lorem] shortcode

Images: Shortcode, Nested shortcode, Example, Lightbox

I needed dummy text for a blog I'm working on, and since I like to code I wrote a simple plugin I'd like to share, you'll find it  in the WordPress Plugin Directory


Plugin: You’ll find the plugin at http://wordpress.org/extend/plugins/lorem-shortcode/

InstallationDownload the plugin and save it in wp-content/plugins (remember to activate in Plugins) or wp-content/mu-plugins or install it from inside WordPress in Plugins->Add New (search for “lorem shortcode”)

UsageAdd the shortcode to a Page. The plugin contains two shortcodes, [lorem] and [loremimage], the [loremimage] shortcode can be nested in the [lorem] shortcode. Supported parameters, all are optional:



  • p="3" Number of paragraphs. Default is 5
  • l="7", Number of lines per paragraph. Default is 3
  • align="right" This tells how you'd like to allign a nested shortcode. There are two alternatives, left or right. Default is right


The loremimage is created using  http://dummyimage.com/, and hence the shortcode supports the same parameters as  http://dummyimage.com/

  • size="400×400" Image size. Default is 300×200.
  • text="lorem ipsum" Default is empty.
  • fgcolor="fff" Image foreground color. Default is "ccc".
  • bgcolor="ccc" Image foreground color. Default is  "eee".
  • format="png", Image format. Default is "png". 

I've added two additional parameters/values

  • size="thumb" This will create a thumbnail, size based on your WordPress image settings. The thumb links to another image and support Lightbox et al (has attribute rel="lightbox[lorem]").
  • style="padding:5px;" Default is empty


  • 1.1 Added support for embedded shortcodes and added the [loremimage] short code. The [loremimage] can be used by itself. The image is created using http://dummyimage.com/
  • 1.0 Initial release



5 thoughts on “[lorem] shortcode

  1. Chris Jewitt

    I came across an article about doing this very same thing in Microsoft Word. If you type in “=rand(p,s)”, replace the p and s with numbers and it will do essentially the thing as your plugin. When I read the article, I thought.. that would be a fun and useful plugin, searched the repository and I ended up here. Nice one!

  2. Mark

    Love this plugin, so useful! There’s lots of Lorem Ipsum text inserting plugins, but this also does images, fantastic!
    Good job!



Leave a Reply

Your email address will not be published. Required fields are marked *