Create a More Flexible CMS With WordPress Using Multiple Editable Content Blocks

Create a More Flexible CMS With WordPress Using Multiple Editable Content Blocks

Have you ever wished for multiple content blocks, in addition to pages and posts, that can be edited within the WordPress dashboard and placed in custom regions of your template? The MultiEdit plugin is your key to breaking open new possibilities for a more modular approach to WordPress. This is very similar to Drupal blocks and content types and allows you to add a greater level of flexibility in theming WordPress as a CMS. Whether you are editing the content and updating the site or passing it off to a client to manage for themselves, an organized content structure with easily updated blocks will ultimately save a great deal of time. It will also be more enjoyable for non-techies to use. We can sometimes forget how foreign the backend of WordPress can be to someone who is not using it every day. Do your users a little favor and simplify the way WordPress manages content.

This tutorial makes use of the Page.ly MultiEdit Plugin working in concert with custom page templates.

Step 1: Install the MultiEdit Plugin and Activate It.

It also works with WPMU, since it is theme-dependent.

Step 2: Create a Custom Page Template and Upload to Your Theme Directory

Copy your current page.php and rename it to anything you like. Make sure to add this to the top of the file:

{code type=php}<?php
/* Template Name: Custom Template
MultiEdit: Right,Bottom,Left
*/
?>{/code}

Step 3: Within Your Template Determine Where to Place the Blocks

This is done by calling the function: multieditDisplay(‘Region’) like so:
{code type=php}

<?php multieditDisplay(‘Bottom’); ?>

{/code}

You can customize ID’s or classes to the div’s and style them however you like to fit your theme.

Step 4: Create a New Page Using Your Custom Template

Simply select the template from the drop down on the page edit screen.

Step 5: Refresh the Page to See the New Tabs MultiEdit Created

The tabs will appear above the visual editor like so:

Add your content and click save and you should see it displayed on the page. Here are the example regions:

How Does it Work?

All of the content associated with the regions you created is stored in the custom_fields table associated with that page or post. Therefore, even if you deactivate the plugin, your data will not be lost since it is stored as a meta item.

We’ve recently had several inquiries on Twitter concerning the viability of using WordPress and BuddyPress as a full-blown CMS. The MultiEdit plugin brings custom content blocks to WordPress without having to widgetize areas. Even with widgetized areas the visual editor is not available to the user when creating the content for that region. This plugin provides an all-around flexible solution for expanding the limited areas available for editing content. In future posts we’ll be looking into more tools that will make WordPress your CMS of choice.