Advertisement

Custom Post Types in the wild (WordCamp Sofia 2012)

CEO at DevriX, Business Advisor
Oct. 20, 2012
Advertisement

More Related Content

Advertisement

Custom Post Types in the wild (WordCamp Sofia 2012)

  1. Custom Post Types In the wild Mario Peshev me.peshev.net @no_fear_inc
  2. Agenda • WordPress • Posts and Pages • Custom Post Types • In the wild • Types • Views
  3. About me • WordPress Engineer at   • DevriX CTO • Open Source trainer  and consultant
  4. 70 000 000+ websites
  5. 21% of all USA­registered domains now
  6. Posts and Pages
  7. Posts – chronological  and archives
  8. Pages – subpages  and templates
  9. But in the end...
  10. phpMyAdmin 
  11. Post Types • Post • Page • Attachment • Revision • Nav Menu
  12. But I need a new structure :
  13. Examples:
  14. Magazine Entries
  15. Products
  16. Real Estates
  17. Slides
  18. Courses
  19. Forms
  20. Air Conditioners 
  21. What's the difference • Unique styling for a post type • Separate categorization • List only post type entries • Common API for all post types • The magic Custom Fields
  22. CuperFields!
  23. Add extra values to a post
  24. Enable them first!
  25. All post types include... • Title • Content area • Date • Featured Image • Revisions
  26. Custom Fields  • Specific information for every post • Rating • Phone number • Everything beyond title, content, featured  image, date or taxonomies
  27. Wait, Taxonomies?
  28. Tags
  29. Categories
  30. And... Custom Taxonomies!
  31. Taxonomies • Great for classification • Drawback: • Support only title • Can't be extended (naturally)
  32. Post Types ­ simple
  33. Post Types ­ full
  34. Register Taxonomy
  35. The Loop • The core iteration WordPress unit
  36. List all product titles Note: always use WP_Query instead. 
  37. List all products in a taxonomy term
  38. The Swiss knife of Post Types
  39. Field groups
  40. Types Range • Types could define: • Post type structure • Taxonomies and relations • Custom field groups per post type • Extra custom fields • Loop is to be done manually
  41. CPT toolkits • Types • Pods • Advanced Custom Fields • Custom Post Type UI • More Fields
  42. Pro users: go to Views
  43. Views sample site
  44. V i e w s
  45. View Templates
  46. Views Disclaimer • Warning: Views is not free, it's $49 for  unlimited number of websites • How come? • Complete LOOP control with UI • Create templates for post types and archives • Submit CPTs from the front end • Widgetized loops
  47. Questions?
Advertisement