SlideShare a Scribd company logo
1 of 32
Download to read offline
K. Adam White, WordCamp Boston 2011

      Stepping Into Custom
      Post Types




Photo by dolanh
Introduction

        Who is this guy, anyway?

              K.Adam White

   Front-end developer & data architect
Introduction
Introduction
Custom Post Types
• What is a custom post type?
Custom Post Types
• What is a custom post type?
Custom Post Types
• What is a custom post type?

• Your own content type

• Blog Posts, Pages, Attachments, Revisions and
  Menus are all “post types” in WordPress 3.0
Register your post type
• Created in functions.php (or a plugin) using
  the “init” hook:
• add_action( 'init', 'create_post_type' );

  function create_post_type() {
     register_post_type(‘nameOfCPT’);
  }
A Basic Custom Post Type
• add_action( 'init', 'create_post_type' );

  function create_post_type() {
      register_post_type( 'acme_product',
              array(
                     'labels' => array(
                        'name' => __( 'Products' ),
                              'singular_name' => __( 'Product' )
                     ),
                     'public' => true,
                     'has_archive' => true,
              )
      );
  }
Basic Post Type Attributes
            • Names: How they display
              in the admin screens (left)
            • What fields the post type
              supports: the content
              editor, a title, thumbnails,
              comments, etc
            • Access rights
Default Template Fields
• Title, Content, Publish box
All Template Fields
             • Many more fields
               available out of the box
             • Once enabled, can be
               hidden or shown from
               the Screen Options tab
Go Crazy!
add_action('init', 'codex_custom_init');
function codex_custom_init()
{
  $labels = array(
   'name' => _x('Books', 'post type general name'), 'singular_name' => _x('Book', 'post type singular name'),
      'add_new' => _x('Add New', 'book'), 'add_new_item' => __('Add New Book'), 'edit_item' => __('Edit
      Book'), 'new_item' => __('New Book'), 'all_items' => __('All Books'), 'view_item' => __('View Book'),
      'search_items' => __('Search Books'), 'not_found' => __('No books found'), 'not_found_in_trash' => __('No
      books found in Trash'),
   'parent_item_colon' => '', 'menu_name' => 'Books‘

    );
    $args = array(
      'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true,
      'show_in_menu' => true,
      'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'has_archive' => true,
      'hierarchical' => false, 'menu_position' => null, 'supports' =>
         array('title','editor','author','thumbnail','excerpt','comments')
    );
    register_post_type('book',$args);
}
But I need more…
• You can use the build-in Custom Fields to
  store custom data attributes
• You can extend the built-in template fields
  with add_meta_box() or a related plugin: I
  recommend WPAlchemy’s MetaBoxes
• Custom Taxonomies allow you create your
  own tags and categories, just for a particular
  Post type
But I’m not much of a coder…
• There’s a plugin for that
• Custom Post Type UI will let you create and
  configure a post type without touching
  functions.php
• Also supports custom taxonomies
Demo: Custom Post Type UI
How to display your Post Types
• Template Hierarchy:
Template Pages
• Create templates using the post type or
  taxonomy’s name:
  – single-{post_type}.php
  – archive-{post_type}.php
  – taxonomy-{taxonomy}.php
• e.g. if your post type is acme_products,
  single-acme_product.php will be used when
  you try to view a single product item
Using CPTs on other pages
From the WordPress Codex:

$args = array( 'post_type' => 'product',
  'posts_per_page' => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
  the_title();
  the_content();
endwhile;
Case Study: Nutfield Technology
CPT #1: Home Page Items
Title, Content, Featured Image, and custom fields
Custom Fields
• Using WPAlchemy MetaBox
• Allows for easier content maintenance
CPT #2: Products
                   • Content, Title,
                     Featured Image,
                     File Attachments,
                     5 Taxonomies,
                     3 WPAlchemy
                     custom fields,
                     Gravity Forms,
                     and more
Custom Taxonomies in Action
• Terms used as classes, to allow easy JavaScript
  filtering of a product list
Advantages of Custom Posts
• Modularization of content on the homepage
• Better Admin panel experience for editors
• Taxonomies allowed quick development of a
  product selection application
• Allowed normal strengths of WordPress posts
  (featured images, file attachments) to be used
  on a custom template
Disadvantages
• Adding custom fields is still code-heavy and
  difficult
• No visual ‘template builder’ in WordPress
• Query syntax for custom posts can be tricky
Gotcha’s
1. Namespaces:

  Always prefix your post type names with a
  namespace, e.g.
  register_post_type(‘acme_products’);
  instead of just ‘products.’ This will minimize
  conflicts with other plugins.
Gotcha’s
2. Portability:

   If you change your theme, you will need to
   do a lot of work to make it compatible with
   your custom post types

   Locks you in to a particular theme (or theme
   framework)
Gotcha’s
3. SEO:

  To make the most of a custom post type, you
  should re-write their URLs using the
  ‘rewrite’ => array(‘slug’ => ‘seo-friendly-title’)
  parameter when creating the CPT. This will
  also hide your namespace from the public.
Gotcha’s
4. Easy to get carried away:

   Remember that another human will have to
   maintain these items! Design for simplicity. A
   more general data structure is usually the
   best.
References
•   Justin Tadlock’s Custom Post Types in WordPress
•   WordPress Codex Custom Post Types page
•   WPAlchemy custom MetaBox class
•   Example add_meta_box() plugin on WP Engineer
•   Custom Post Type UI plugin
Thank You!
• adam@kadamwhite.com
• +K.Adam
• @kadamwhite

• This is my first talk—Please rate me!
  http://speakerrate.com/talks/8024-stepping-
  into-custom-post-types

More Related Content

What's hot

Drupal overview-training
Drupal overview-trainingDrupal overview-training
Drupal overview-training
Sam Davis
 
Creative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS BasicsCreative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS Basics
Lukas Oppermann
 

What's hot (7)

Drupal overview-training
Drupal overview-trainingDrupal overview-training
Drupal overview-training
 
What is the WordPress Loop?
What is the WordPress Loop?What is the WordPress Loop?
What is the WordPress Loop?
 
Creative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS BasicsCreative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS Basics
 
Introduction to XMLUI and Mirage Theming for DSpace 3
Introduction to XMLUI and Mirage Theming for DSpace 3Introduction to XMLUI and Mirage Theming for DSpace 3
Introduction to XMLUI and Mirage Theming for DSpace 3
 
Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 

Viewers also liked

Custom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealCustom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp Montreal
Joey Kudish
 

Viewers also liked (7)

A/B Testing: Make your wildest conversion goals come true
A/B Testing: Make your wildest conversion goals come trueA/B Testing: Make your wildest conversion goals come true
A/B Testing: Make your wildest conversion goals come true
 
Custom Post Types--Front End
Custom Post Types--Front EndCustom Post Types--Front End
Custom Post Types--Front End
 
Advanced Custom Post Types
Advanced Custom Post TypesAdvanced Custom Post Types
Advanced Custom Post Types
 
WP 201 Custom Post Types - Custom Fields - WordCamp Columbus 2015
WP 201   Custom Post Types - Custom Fields - WordCamp Columbus 2015WP 201   Custom Post Types - Custom Fields - WordCamp Columbus 2015
WP 201 Custom Post Types - Custom Fields - WordCamp Columbus 2015
 
Custom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealCustom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp Montreal
 
Custom Post Types and Taxonomies
Custom Post Types and TaxonomiesCustom Post Types and Taxonomies
Custom Post Types and Taxonomies
 
Custom post types - WordPress
Custom post types - WordPressCustom post types - WordPress
Custom post types - WordPress
 

Similar to Stepping Into Custom Post Types

Extending WordPress. Making use of Custom Post Types
Extending WordPress. Making use of Custom Post TypesExtending WordPress. Making use of Custom Post Types
Extending WordPress. Making use of Custom Post Types
Utsav Singh Rathour
 
Creatively creating custom post types! word sesh2
Creatively creating custom post types!  word sesh2Creatively creating custom post types!  word sesh2
Creatively creating custom post types! word sesh2
techvoltz
 
The WordPress University 2012
The WordPress University 2012The WordPress University 2012
The WordPress University 2012
Stephanie Leary
 
Wordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean CodingWordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean Coding
inspector_fegter
 

Similar to Stepping Into Custom Post Types (20)

Extending WordPress. Making use of Custom Post Types
Extending WordPress. Making use of Custom Post TypesExtending WordPress. Making use of Custom Post Types
Extending WordPress. Making use of Custom Post Types
 
WordPress 3 Custom Post Types
WordPress 3 Custom Post TypesWordPress 3 Custom Post Types
WordPress 3 Custom Post Types
 
Creatively creating custom post types! word sesh2
Creatively creating custom post types!  word sesh2Creatively creating custom post types!  word sesh2
Creatively creating custom post types! word sesh2
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...
Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...
Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...
 
The WordPress University 2012
The WordPress University 2012The WordPress University 2012
The WordPress University 2012
 
Wordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean CodingWordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean Coding
 
Building themesfromscratchwithframeworks
Building themesfromscratchwithframeworksBuilding themesfromscratchwithframeworks
Building themesfromscratchwithframeworks
 
ITPROceed 2016 - The Art of PowerShell Toolmaking
ITPROceed 2016 - The Art of PowerShell ToolmakingITPROceed 2016 - The Art of PowerShell Toolmaking
ITPROceed 2016 - The Art of PowerShell Toolmaking
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
Custom Post Types in WP3
Custom Post Types in WP3Custom Post Types in WP3
Custom Post Types in WP3
 
CodeIgniter & MVC
CodeIgniter & MVCCodeIgniter & MVC
CodeIgniter & MVC
 
WordPress A CMS for Beginners, Geeks and Those In-Between
WordPress A CMS for Beginners, Geeks and Those In-BetweenWordPress A CMS for Beginners, Geeks and Those In-Between
WordPress A CMS for Beginners, Geeks and Those In-Between
 
presentation
presentationpresentation
presentation
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
Using Custom Post Types and Advanced Custom Fields with Elementor
 Using Custom Post Types and Advanced Custom Fields with Elementor Using Custom Post Types and Advanced Custom Fields with Elementor
Using Custom Post Types and Advanced Custom Fields with Elementor
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
What's New in WordPress 3.0 (for developers)
What's New in WordPress 3.0 (for developers)What's New in WordPress 3.0 (for developers)
What's New in WordPress 3.0 (for developers)
 
WP 101 - Custom Fields & Post Types
WP 101 - Custom Fields & Post TypesWP 101 - Custom Fields & Post Types
WP 101 - Custom Fields & Post Types
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 

Stepping Into Custom Post Types

  • 1. K. Adam White, WordCamp Boston 2011 Stepping Into Custom Post Types Photo by dolanh
  • 2. Introduction Who is this guy, anyway? K.Adam White Front-end developer & data architect
  • 5. Custom Post Types • What is a custom post type?
  • 6. Custom Post Types • What is a custom post type?
  • 7. Custom Post Types • What is a custom post type? • Your own content type • Blog Posts, Pages, Attachments, Revisions and Menus are all “post types” in WordPress 3.0
  • 8. Register your post type • Created in functions.php (or a plugin) using the “init” hook: • add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type(‘nameOfCPT’); }
  • 9. A Basic Custom Post Type • add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'acme_product', array( 'labels' => array( 'name' => __( 'Products' ), 'singular_name' => __( 'Product' ) ), 'public' => true, 'has_archive' => true, ) ); }
  • 10. Basic Post Type Attributes • Names: How they display in the admin screens (left) • What fields the post type supports: the content editor, a title, thumbnails, comments, etc • Access rights
  • 11. Default Template Fields • Title, Content, Publish box
  • 12. All Template Fields • Many more fields available out of the box • Once enabled, can be hidden or shown from the Screen Options tab
  • 13. Go Crazy! add_action('init', 'codex_custom_init'); function codex_custom_init() { $labels = array( 'name' => _x('Books', 'post type general name'), 'singular_name' => _x('Book', 'post type singular name'), 'add_new' => _x('Add New', 'book'), 'add_new_item' => __('Add New Book'), 'edit_item' => __('Edit Book'), 'new_item' => __('New Book'), 'all_items' => __('All Books'), 'view_item' => __('View Book'), 'search_items' => __('Search Books'), 'not_found' => __('No books found'), 'not_found_in_trash' => __('No books found in Trash'), 'parent_item_colon' => '', 'menu_name' => 'Books‘ ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title','editor','author','thumbnail','excerpt','comments') ); register_post_type('book',$args); }
  • 14. But I need more… • You can use the build-in Custom Fields to store custom data attributes • You can extend the built-in template fields with add_meta_box() or a related plugin: I recommend WPAlchemy’s MetaBoxes • Custom Taxonomies allow you create your own tags and categories, just for a particular Post type
  • 15. But I’m not much of a coder… • There’s a plugin for that • Custom Post Type UI will let you create and configure a post type without touching functions.php • Also supports custom taxonomies
  • 16. Demo: Custom Post Type UI
  • 17. How to display your Post Types • Template Hierarchy:
  • 18. Template Pages • Create templates using the post type or taxonomy’s name: – single-{post_type}.php – archive-{post_type}.php – taxonomy-{taxonomy}.php • e.g. if your post type is acme_products, single-acme_product.php will be used when you try to view a single product item
  • 19. Using CPTs on other pages From the WordPress Codex: $args = array( 'post_type' => 'product', 'posts_per_page' => 10 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); the_title(); the_content(); endwhile;
  • 20. Case Study: Nutfield Technology
  • 21. CPT #1: Home Page Items Title, Content, Featured Image, and custom fields
  • 22. Custom Fields • Using WPAlchemy MetaBox • Allows for easier content maintenance
  • 23. CPT #2: Products • Content, Title, Featured Image, File Attachments, 5 Taxonomies, 3 WPAlchemy custom fields, Gravity Forms, and more
  • 24. Custom Taxonomies in Action • Terms used as classes, to allow easy JavaScript filtering of a product list
  • 25. Advantages of Custom Posts • Modularization of content on the homepage • Better Admin panel experience for editors • Taxonomies allowed quick development of a product selection application • Allowed normal strengths of WordPress posts (featured images, file attachments) to be used on a custom template
  • 26. Disadvantages • Adding custom fields is still code-heavy and difficult • No visual ‘template builder’ in WordPress • Query syntax for custom posts can be tricky
  • 27. Gotcha’s 1. Namespaces: Always prefix your post type names with a namespace, e.g. register_post_type(‘acme_products’); instead of just ‘products.’ This will minimize conflicts with other plugins.
  • 28. Gotcha’s 2. Portability: If you change your theme, you will need to do a lot of work to make it compatible with your custom post types Locks you in to a particular theme (or theme framework)
  • 29. Gotcha’s 3. SEO: To make the most of a custom post type, you should re-write their URLs using the ‘rewrite’ => array(‘slug’ => ‘seo-friendly-title’) parameter when creating the CPT. This will also hide your namespace from the public.
  • 30. Gotcha’s 4. Easy to get carried away: Remember that another human will have to maintain these items! Design for simplicity. A more general data structure is usually the best.
  • 31. References • Justin Tadlock’s Custom Post Types in WordPress • WordPress Codex Custom Post Types page • WPAlchemy custom MetaBox class • Example add_meta_box() plugin on WP Engineer • Custom Post Type UI plugin
  • 32. Thank You! • adam@kadamwhite.com • +K.Adam • @kadamwhite • This is my first talk—Please rate me! http://speakerrate.com/talks/8024-stepping- into-custom-post-types