Two Plugins to help turn WordPress into a CMS

As described in a post earlier today, I have made some significant changes to this site. The short version is that I’ve started to use WordPress as a CMS (content management system). While the WordPress APIs provide a good range of functions for doing CMS-like things, the web interface is disappointingly lacking in even basic CMS features. Thankfully, WordPress’s plugin architecture has allowed the community to fill in the gaps.

As a rule, I install as few plugins as possible. Each extra plugin adds a little more attack surface to your site, so install exactly as few plugins as you need to create the site you want, no more, no less.

At the heart of a CMS is the ability to collect properly categorised and tagged content together into meaningful views. In short, you need to be able to generate lists of posts or pages matching a given criteria, and insert those lists into a post or a page. You need to be able to mix these lists into user editable content, so what you really need are WordPress short codes that expose this functionality. There are quite a few to choose from, but I have settled on just two, one focused on posts, and one focused on pages. There is some overlap between the two, but both have features the other does not.

A Plugin for Listing Pages

Lets start with the simplest one, a short code for listing pages. The critical feature from my point of view is the ability to insert a short code to list all pages that are child pages of the page the short code is inserted into. The plugin I chose is page-list. This plugin provides the following short codes:

[pagelist] – which generates a nested tree of pages, basically, a site map.

[subpages] – which generates a nested tree of pages with the current page as the root of the tree – basically a single branch of the site map. This is the short code I really need.

[siblings] – which generates a nested tree with all the current page’s siblings as roots of the trees.

[pagelist_ext] – which generates the same as [pagelist], but includes page excerpts.

All of these short codes take arguments to modify their behaviour in various ways, for example, the depth argument can be used to limit the depth of the trees, and pages can be excluded from the listing using the exclude argument. You can see the impressively comprehensive list of supported arguments here.

A Plugin for Listing Posts

The second plugin I need is one that provides a short code for listing blog posts that meet a certain criteria. Again, there were many to choose from, but the one I settled on is Display Posts Shortcode. This plugin allows just a single short code, [display-posts], but it’s a very versatile short code supporting an impressive list of arguments and enabling many different searches, renderings, and sort orders. For a full list see the plugin’s documentation wiki.

I’m primarily using the short code to filter based on tags, but it really is impressively versatile.