BatBits is a set of small, useful shortcodes that make certain things a little easier.  Currently, there are four shortcodes, and they are in operation on my local copy of the Lochac Kingdom History website.

Download the plugin here: BatBits.


[bat-pagelist page=”Page Name”]

Lists all the pages directly under a specified one in the page hierarchy.  On the Branches page this is in operation listing the sub-pages of the Baronies, Shires, Cantons, Colleges and Defunct pages.  All the user has to do is set the appropriate “parent” for a page and it will be included.

The page argument specifies the parent page whose subpages should be listed.


[bat-pagetree depth=int]

Lists the entire subtree of the current page.  Put it on a page and it gives a nested tree listing of every page with that page as a parent, grandparent and so on.  When all else fails, this will at least ensure that No Child Is Left Behind.

The depth argument constrains the depth of the recursion; it defaults to 99.


[bat-insert page=”Page Name”]

Takes a page name and inserts its contents inside a blue box, as seen on the “please wait” portion of, for example, the About page.  The page it’s taken from is an ordinary page, so can be edited in the usual way.


[bat-infobox page=”Template Page Name”]
    *MACRO-1* Value of first macro
    *MACRO-2* Value of second macro
    possibly extending onto
    multiple lines
    *ETC* etc etc

A very simple templating engine. First you make a template page, like this.  Then you make a page to use it, like this.  That box on the right-hand side is generated from the template page, but I specify the replacement values of *NAME*, *CAPTION*, *PROGRESS* and so on in the shortcode and everything gets tidily merged.  This means all the infoboxes can be reformatted in one go, and using them is about as easy as it can be.