There has been a lot of buzz regarding using WordPress as a CMS lately, with many clever solutions that come up. Today, we will
be a bit lazy try to use a plugin that is made precisely for CMS-making instead.
One of the important feature of a CMS is the capability to create different content types. Say we want to make an “Events” content type. Here, we will probably need to make it so that user can input a title, a description, and the date/time for that event. Under WordPress, you can trick this by using the custom field to store that date and time value, and calling them within the theme’s code.
This practice, of course, is tedious, error-prone (mistypings, etc), and generally inconvenient.
Flutter allows you to create what it calls a Write Panel. This, basically, is a custom content type in which you can add your own fields. So, if a vanilla WordPress installation gives you two different content types (Post and Page), Flutter enables you to add more Write Panels to your likings. Now let’s go make ourselves an Events Write Panel!
Let’s Try This!
The steps to create a Write Panel will be like this:
Install and activate Flutter. This will Create two different menu on your dashboard: A “Flutter” menu and another one under “Settings > Flutter”. Create a category. Name it ‘Events’, for our example. Create the Write Panel. Go to “Flutter > Write Panels” and click the “+ Create a Write Panel” button.
Next is the Write Panel setup page:
What happened here? First, you decide whether this Write Panel should mimic the Write Post or the Write Page panel. Assuming we’re going to have multiple Events posted, we go with Post. This choice also affects what Advanced Fields options are available for this Write Panel (try toggling between the Post and Page option). For the Assigned Categories, we give it “Events”. We didn’t just make this category previously for nothing, right?
Now, the Standard and Advanced Fields are interesting. These are basically the default fields you get when you open Write Post (or Page). If we don’t tweak this, then the Write Panel will look exactly like a Write Post page. If you want to make things simpler for your user, for example, you might consider removing some of them. For our example here, I remove everything from the Advanced Fields (I’ll show you the result soon). Click Finish when you’re done.
Get back to “Flutter > Write Panels“. Our Events Write Panel should be there, and there’s an “Edit Fields/Groups” option next to it. Go there. On the next page, you have the option to create a Group or Field. A Group is basically a box that contains one or more fields. For simplicity sake, we go straight to creating a new Field.
Name it, label it, and see that there’s even a built-in Date field type already. How convenient! Continue and you will be given a option to choose how to format the Date. Pick one and finish it. That is all!
Now let’s see the result of our work so far. Pick the topmost “Write” option, and you should see a new submenu named “Events”. Could this be…?
Oh yeah. Very nice. At the bottom of this page, you should see the Date field we just made. Also notice that the usual options (Trackbacks, etc) are gone, because we opt not to display it back at the Write Panel setup page.
Displaying the Custom Fields’ Values
The documentation (PDF file) does a good job explaining it. Go to part 3. Flutter Reference and you will se the three functions (
get_audio()) needed to grab the value of the custom fields in our Write Panel. This comment thread could also be some help, too.
Geared towards making WordPress a powerful CMS, Flutter does a lot of things right. In fact, Write Panel is just one of its strong feature; there’s also a layout and module management built into this plugin as well. As of this writing, Flutter is currently in beta, so there are plenty areas where it can be polished (uninstallation apparently does not work cleanly, for example). Nevertheless, I believe this is a plugin worth keeping an eye on.
And who knows? Before getting acquired, BuddyPress was once just a set of plugins too, right?