Templ33t is a WordPress & WordPress MS plugin that adds tabs to the edit page for custom content blocks using enhanced theme-specific configuration and smart template switching.
Templ33t is based on the MultiEdit plugin by Page.ly. I stumbled across it while searching for a better way to offer custom page templates to the users of a multi-site wordpress installation I manage. MultiEdit is great but I needed to offer my novice users a more fluid, CMS-like flow when it came to activating and using the templates. Many improvements are planned, stay tuned!
- Adds tabs to page edit area for content blocks
- Auto-generation of custom fields
- Smart Template Switching (aware of templates containing blocks)
- Simple XML configuration
Place a file called templ33t.xml into any theme you would like to enable custom code blocks in. The XML should follow this structure:
template-file.php Main Content Custom_Block_1 Custom_Block_2
You can add as many <template> elements as you wish and as many <block> elements within those. <block> values should key-safe and contain no spaces or special characters. Underscores are filtered to spaces when the tab labels are generated.
To output custom block data in your templates, use the following code:
// output content block templ33t_block('Custom_Block_1');
To force this plugin across all sites on a multi-site installation of wordpress (or wordpress mu), take the following steps:
- Copy templ33t directory to mu-plugins
- Move templ33t.php to parent directory (mu-plugins)
- Open templ33t.php and change the TEMPL33t_ASSETS definition to WP_CONTENT.’/mu-plugins/templ33t/’
That’s all there is to it!