Extending Custom Post Types

  • 958 views
Uploaded on

WordCamp Raleigh on May 21, 2011

WordCamp Raleigh on May 21, 2011

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
958
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
9
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

  • 1. EXTENDING CUSTOM POST TYPES Ryan Duff WordCamp Raleigh 2011
  • 2. ABOUT ME Ryan Duffemail: ryan@fusionized.com web: fusionized.com twitter: @ryancduff
  • 3. BRIEF OVERVIEW OF CUSTOM POST TYPES
  • 4. WHAT ARE CUSTOM POST TYPES?• Custom post types behave the same as posts• Better term would be content types• Think: Products, Events, etc...• Built in CPTs: Post, Page, Revision, Attachment, Nav_Menu
  • 5. A WORD ON TAXONOMIES• Taxonomies are a descriptor• Think: meta information• Built in: Cagetory, Tag
  • 6. CREATING A CPT
  • 7. CREATING A TAXONOMY
  • 8. CUSTOM COLUMNS3.1 (Do This)add_filter( manage_edit-venue_columns, venue_columns );add_action( manage_venue_posts_custom_column,venue_show_columns, 10, 2 );3.0 (Not This)add_filter( manage_edit-venue_columns, venue_columns );add_action( manage_posts_custom_column,venue_show_columns, 10, 2 );
  • 9. FILTER THE LIST
  • 10. DO SOMETHING
  • 11. ADDING META BOXES
  • 12. A BETTER WAY Use a class... a handy one from Andrew Norcross https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress• Its simpler• Its faster• Its cleaner
  • 13. ADMIN DASHBOARD WIDGETS• Remove the clutter• Simplify things for your clients• Make things easily accessible
  • 14. REMOVE DASHBOARD WIDGETSadd_action( admin_init, remove_dashboard_boxes, 0 );
  • 15. ADD DASHBOARD WIDGETS
  • 16. CHECK THIS OUT: Twenty Ten CRMhttp://www.billerickson.net/twentyten-crm/
  • 17. Ryan Duffemail: ryan@fusionized.com web: fusionized.com twitter: @ryancduff