The Internet belongs to everyone. Let’s keep it that way.

Protect Net Neutrality
Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Class{ifying} Custom Post Types / Developer Edition

No description
by

Seth Carstens

on 25 September 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Class{ifying} Custom Post Types / Developer Edition

Class{ifying} Custom Post Types / Developer Edition
Anatomy of a
Post
1. A post is a database row entry.

2. A post has *unlimited amounts of relational data, stored in another table. We call them "post_meta".
Anatomy of a
Taxonomy
Taxonomy - Method of Organization, a classification, a type of something, means of grouping
*(Carstens Definition)

Is-a and has-a relationships
Post (Content) Type Registrations
Default Registrations: post, page, attachment, revision, nav_menu_item

Custom Registrations:
Assess Fields vs Taxonomies
Custom Fields: label and value (complex values stored in serialized arrays)
Custom Taxonomies: organizational attributes or units, often relationships

Pick One? Almost any custom data you store COULD be stored in either. Beware of processing time required for taxonomies.
Build yourself a helper class (or use mine)
Build a template class, and extend it, making future CPT's simpler to create (this is OOP).

https://github.com/WordPress-Phoenix/proof-of-concept-custom-post-type-permalinked-to-taxonomy
WordPress Database Diagram
https://github.com/WordPress-Phoenix/proof-of-concept-custom-post-type-permalinked-to-taxonomy/blob/master/proof-of-concept-custom-post-type-permalinked-to-taxonomy.php#L50
Attribute Model
Taxonomy Model
Full transcript