, LLC.

How to Use Custom Post Types for WordPress CMS  Websites

adam farouk projects cmsWith WordPress 3.0’s new post type and custom taxonomy additions, a powerful user-friendly CMS is far easier to achieve. I’m working on a few projects right now that utilize post types to and thought it would be helpful to post a few tricks I’ve picked up along the way.

1. Custom Post Type UI Plugin Makes it Easy

adam farouk post type uiIt’s quick, easy and provides everything I need. I haven’t encountered any bugs, and have found that’s it’s a solid, reliable option for use on professional client work. Check out more over at WebDevStudios.

2. Attach Form Fields & Meta Boxes

adam farouk verve meta boxesI use the Verve Meta Boxes plugin for this. The newest release allows you to attach a meta box onto a post type, opening the door to endless possibilities for content management. If you go this route remember that you MUST have custom fields enabled for that Post Type. Without it your Verve meta box will not show up on your post type.

3. Using the Custom Field Template For Advanced Meta Boxes

adam farouk custom field templateIf you need more advanced form fields than I would suggest the Custom Field Template. It’s great for adding multiple TinyMCE instances to a post, or an “Add Another” input setup to allow for duplicate form field entries. Using it you can attach your templates to custom post types using the “Custom Post Type” field. The meta box display isn’t that great. I often little custom CSS to improve it. A little CSS in the WordPress admin can go a long way toward making things easier to use.

I would recommend customizing the settings a bit. I always disable the initialize and save button’s to clean-up the UI and make it less error prone for clients.

4. Don’t be surprised if your plugin meta boxes aren’t supported

It’s a little tricky for plugin authors to attach their meta boxes to your custom post types. Many plugins aren’t current supporting post type meta boxes, so don’t count on plugin capabilities being available without doing your research first. One key feature people will need is SEO meta management. If you’re in need check out the most recent release of All in One SEO. It has a “SEO for Custom Post Types” option that will enable the meta manager box for all your post types once checked. If you’re a plugin author you may want to dig into the code behind the scenes, it’s a handy snippet to enable meta boxes for custom post types.

5. Provide the Best WordPress Admin Experience

This is something I love to do. In my opinion, a little CSS time spent on the WordPress admin goes a long way when it comes to user experience. To do this I use two handy functions. One loads a stylesheet from my theme directory into the admin. Another add’s the page ID information to the admin body_class(), allowing you target specific pages in the admin. Have you ever wanted to show a meta box on one page, and only that page? This is a nice, although a bit hackish, method.

Want More? Check out Customizing the WordPress Admin for a Better Administrator Experience

Meet the Author

Kevin Leary, WordPress Consultant

I'm a freelance web developer and WordPress consultant in Boston, MA with 16 years of experience building websites and applications. View a portfolio of my work or request an estimate for your next project.