Extending Custom Post Types

1,042
-1

Published on

WordCamp Raleigh on May 21, 2011

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,042
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Extending Custom Post Types

    1. 1. EXTENDING CUSTOM POST TYPES Ryan Duff WordCamp Raleigh 2011
    2. 2. ABOUT ME Ryan Duffemail: ryan@fusionized.com web: fusionized.com twitter: @ryancduff
    3. 3. BRIEF OVERVIEW OF CUSTOM POST TYPES
    4. 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. 5. A WORD ON TAXONOMIES• Taxonomies are a descriptor• Think: meta information• Built in: Cagetory, Tag
    6. 6. CREATING A CPT
    7. 7. CREATING A TAXONOMY
    8. 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. 9. FILTER THE LIST
    10. 10. DO SOMETHING
    11. 11. ADDING META BOXES
    12. 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. 13. ADMIN DASHBOARD WIDGETS• Remove the clutter• Simplify things for your clients• Make things easily accessible
    14. 14. REMOVE DASHBOARD WIDGETSadd_action( admin_init, remove_dashboard_boxes, 0 );
    15. 15. ADD DASHBOARD WIDGETS
    16. 16. CHECK THIS OUT: Twenty Ten CRMhttp://www.billerickson.net/twentyten-crm/
    17. 17. Ryan Duffemail: ryan@fusionized.com web: fusionized.com twitter: @ryancduff
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×