Extending Custom Post Types
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Extending Custom Post Types

on

  • 1,235 views

WordCamp Raleigh on May 21, 2011

WordCamp Raleigh on May 21, 2011

Statistics

Views

Total Views
1,235
Views on SlideShare
1,234
Embed Views
1

Actions

Likes
0
Downloads
9
Comments
0

1 Embed 1

http://fusionized.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Extending Custom Post Types Presentation 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