tero.co.uk

Bits of HTML (Wordpress plugin)

This is a Wordpress plugin which lets you insert arbitrary bits of HTML into pages using shortcodes like [bitsofhtml label="home page image"]. This is useful if there are complicated bits of HTML in your pages and they get easily broken when edited. You can maintain the complicated bits of HTML in a separate place and just refer to them via the shortcode. Also see the similar Insert a page Wordpress widget.

  • Download the file bits-of-html.php
  • Save it as bits-of-html.php in the wp-content/plugins/ directory
  • Activate it from the Wordpress Plugins page
  • Under the Pages menu, click on "Bits of HTML" and add your bits of HTML, giving each bit a label
  • When editing a Wordpress page, add the shortcode [bitsofhtml label="your label"] and Update