• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Extending Custom Post Types
 

Extending Custom Post Types

on

  • 1,175 views

WordCamp Raleigh on May 21, 2011

WordCamp Raleigh on May 21, 2011

Statistics

Views

Total Views
1,175
Views on SlideShare
1,174
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 Extending Custom Post Types Presentation Transcript

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