Custom Post Types, are by far and away one of the best additions to WordPress. However, they can be a bit cumbersome to set-up.
With the IMG Custom Post Types plug-in creating basic custom post types is now easy.
- Upload the
img-custom-post-typesfolder to the
- Activate the IMG Custom Post Types plugin through the ‘Plugins’ menu in WordPress
- Add new custom post types by editing your functions.php file using these examples
- Usage: –
Example with custom meta fields:
Example with custom meta fields and data types:
Retrieving custom post type and Ordering by a date based custom field
Contributors & Developers
“IMG Custom Post Types” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Take advantage of new type=”date” input attribute/value on date fields. Removal of custom date picker where HTML5 is supported
- Bug fixed where NULL/unset foreign keys field shows the post title in table listings view
- If thumbnails are supported then they are shown in the listings screen of the custom post type
- Instead of just one to one relationships between two custom post types you can now assign one to many relationships by naming a custom field say
- Bug fixed where custom taxonomies were added to posts as well as the new custom post type
- Ability to use a datepicker to date fields in custom fields
- Date fields get timestamped too, so order by date in the get_posts() function with the meta_compare value should work
- Bug fixed where custom meta fields were not showing in View Posts listings view
- Longer copy custom fields (indicated by an _textarea naming convention) not show in View Posts listings view
- Read me file improved.
- Screenshots added.
- Tiny bug fixed with the naming of custom fields