November 15, 2014 - Custom Content, Editor Tips, How to

Custom post types (such as "externship") are created by CCTM

Custom taxa are created with the WCK - Custom Fields and Custom Post Types Creator[1]

A few hard-learned points:

  • for publish/edit/delete capabilities, on the CCTM "Advanced" tab, set only the "Capability Type" as a singular noun name and do not check "Map Meta Cap" or bother to fill in the "Capabilities" boxes - neither of these is well (? at all ?) documented and are not needed. Then, in the "User Roles Editor" (separate plugin under "Users"), use "Add Capability" to create: "delete_custom", "edit_custom", "edit_customs" and "publish_custom" replacing "custom" with the singular name of your custom content type. The "edit" in singular and plural seemed to both be necessary (perhaps a bug?).
  • to include categories on the dashboard list page, in the WCK taxonomy editor, under "Advanced Options" set "Show Admin Columns" to true.
  • to make categories "checkable" - i.e. categories instead of tags, in the WCK taxonomy editor, set "Hierarchical" to true. (tags are *not* hierarchical! categories are.)
  • if custom fields will have a limited range of content, it is usually easier to attach a custom category and/or tag, albeit a bit harder to add it to a display page. Custom content field can be added to any page with the WYSIWYG editor, custom taxa need a bit more scripting to make them show... (although shortcodes can do the job)
  • for search listings, most custom content types are wanted in search results (see the CCTM option for this), many custom post types will be okay in the regular search results "archive" page listing format, but you may want to create a "single-custom.php" template page with the assistance of the CCTM "View Sample Templates" link

Of note: *Normally* (and especially for events and documents) we will use categories to denote "who" and tags to denote "what" - this is a guide that does not necessarily hold for custom post types. Of more importance, categories are *always* a limited, generally set list. Tags can be more open-ended, flexible, growing lists. See Best Practices for more details.

Current Custom Content Types


[1] WCK also has a Custom Fields Creator and a Custom Post Type Creator, both currently disabled, that could have been used to create the "externship" custom post type. CCTM seems a bit more complete (except for a taxonomy creator!) and otherwise more stable and mature. WCK is under active development and we can switch to it at any time.

Comments are closed.