=== Plugin Name === Contributors: fireproofsocks Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=355ULXBFXYL8N Tags: cms, content management, custom post types, custom content types, custom fields, images, image fields, ecommerce, modx Requires at least: 3.0.1 Tested up to: 3.0.1 Stable tag: 0.8.0
Create custom content types (aka post types), standardize custom fields for each type, including dropdowns and images. Gives WP CMS functionality.
== Description ==
The Custom Content Type Manager plugin allows users to create custom content types (also known as post types) and standardize custom fields for each content type, including dropdowns, checkboxes, and images. This gives WordPress CMS functionality making it easier to use WP for eCommerce or content-driven sites.
One of the problems with WordPress' custom fields is that they are not standardized: users must add them one at a time each time they create a new post. Furthermore, by default, WordPress' custom fields supports only text fields. This plugin lets users define a list of custom fields for each content type so that the same custom fields appear on each new post in a uniform way.
For example, you can define a custom content type for "movie", then add a textarea field for "Plot Summary", an image field for "Poster Image", and a dropdown field for "Rating". All of these fields are available in the template's single-movie.php
template file by using the included print_custom_field() function, e.g. <?php print_custom_field('rating'); ?>
Custom content types get their own link in the admin menus and their own URL structure.
== Installation ==
/wp-content/plugins/
directory or install it using the traditional WordPress plugin installation.== Frequently Asked Questions ==
= What does activating a custom content type do? =
When you activate a custom content type, you ensure that it gets registered with WordPress. Once the content type is registered, a menu item will get created (so long as you checked the "Show Admin User Interface" box) and you ensure that its custom fields become standardized. If the "Public" box was checked for this content type, then the general public can access posts created under this content type using the URL structure defined by the "Permalink Action" and "Query Var" settings, e.g. http://site.com/?post_type=book&p=39
"Activating" a built-in post-type (i.e. pages or posts) will force their custom fields to be standardized. If you do not intend to standardize the custom fields for pages or posts, then there is no reason for you to activate them.
= What does deactivating a custom content type do? =
If you deactivate a custom content type, its settings remain in the database, but every other trace of it vanishes: any published posts under this content type will not be visible to the outside world, and the WordPress manager will no longer generate a link in the admin menu for you to create or edit posts in this content type.
Deactivating a built-in post-type (a.k.a. content type) merely stops standardizing the custom fields; deactivating a built-in post-type has no other affect.
= What types of custom fields are supported? =
Text fields, textarea, WYSIWYG, dropdowns (with customizable options), checkboxes, and media fields (which allow the user to select an image, video, or audio clip).
= How do I make my custom field values show up in my templates? =
Content and templates must go hand in hand. If you have defined custom fields, you have to modify your theme files to accommodate them. There are two included theme functions intended to help you with this task:
In this plugin's settings area, each content-type has a link to "View Sample Template" -- this page gives you a fully customized example showing demonstrating a custom theme file for your custom content type.
See the includes/functions.php file in this plugin's directory for some other theme functions that are in development.
= How can I use this plugin to support an eCommerce site? =
There are many ways to structure a site depending on what you are selling. For an example, let's say you are selling T-shirts. You could create a "shirt" content type, then you could define custom fields for size, color, and perhaps several image fields. Once you had defined the custom content type, you could simply create several "shirt" posts for each shirt design that you are selling.
== Known Bugs ==
== Screenshots ==
== Changelog ==
= 0.8.0 =
== Requirements ==
These requirements are tested during WordPress initialization; the plugin will not load if these requirements are not met. Error messaging will fail if the user is using a version of WordPress older than version 2.0.11.
== About ==
This plugin was written in part for the forthcoming book "Beginning WordPress Plugin Development" published by Packt. It was inspired by the Custom-Post Type UI plugin written by Brad Williams. The Custom-Post Type UI plugin offers some of the same features, but I felt that its architecture was flawed: it stores data as taxonomical terms, which is conceptually awkward at a development level, and more importantly, it limits the each custom field to 200 characters of data, making it impossible to store certain types of custom content.
On the surface, this plugin is similar, but this plugin "correctly" stores custom field data as post meta data, which allows allows for different input types (e.g. checkboxes, dropdowns, and images) and the custom fields offered by this plugin can support data of virtually unlimited size. For example, you could define a WYSIWYG custom field for your custom content type and it could hold many pages of data.
The architecture for this plugin was also inspired by MODx. WordPress is making progress as a viable content management system, but even after the thousands of lines of code in this plugin, it still does not support all the features in a system like MODx. WordPress templates are particularly limited by comparison. WordPress is great system for many scenarios, but if you're feeling that WordPress is starting to tear apart at the seams when it comes to custom content, it may be worth a look at another plugin or some of the other available systems.
== Future TO-DO ==
If you are eager to see one of these features implemented in a future release, please share your feedback!
== Upgrade Notice ==
= 0.8.0 = Initial public release.
== See also and References ==