WordCamp San Diego:
Advanced Custom Post Types

Follow me on Twitter (@theandystratton) for more updates on this presentation, >a href=”#the-code”>the code, The WordPress Codex questions and further information and documentation on Content Blocks/Content Tags.

Slides

http://www.slideshare.net/theandystratton/advanced-custom-post-types

Download a PDF →

Free Plugins

Content Blocks

Generic and reusable custom post type for arbitrary content. Can be repurposed for any simple content containing title, content, date, thumnail/images, attachments, ordering and more. Easily extendible and contains shortcodes and built-in filters.

https://github.com/szbl/szbl-content-blocks

Link to WP.org repository coming soon. Documentation will be continually updated on the GitHub page.

Content Tags

Generic and reusable custom taxonmy for arbitrary content. Can be repurposed for any simple content containing title, content, date, thumnail/images, attachments, ordering and more. Easy to extend with built-in filters.

https://github.com/szbl/szbl-content-tags

Link to WP.org repository coming soon. Documentation will be continually updated on the GitHub page.

Code

Enter Title Here:
props to @norcross from last years “Stay Class, WordPress
https://gist.github.com/theandystratton/5225881

Post Type Custom Admin Columns
https://gist.github.com/theandystratton/5225903

Custom Taxonomy Admin Column
https://gist.github.com/theandystratton/5226656

Querying for Custom Post Types:
https://gist.github.com/theandystratton/5226712

Modify Content Tags Behavior:
https://gist.github.com/theandystratton/5226757

CPT Icons:
https://gist.github.com/theandystratton/5226783

WordPress Codex References

WP_Query Reference
Specifically pay attention to query vars for getting posts like tax_query and meta_query

Registering Custom Post Types using register_post_type(). Pay attention to args including: supports, public, show_ui, and labels.

Registering Custom Post Types using register_post_type(). Pay attention to args including: labels, public, show_admin_column and hierarchical.

Thanks!