Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Structured Data in WordPress

6,243 views

Published on

Not just for blogging anymore, WordPress is an effective platform for powering websites with a variety of types of content: product catalogs, store locations, employee directories, and more.

Using advanced WordPress features like custom post types, store this content as structured data to make it easier to maintain and better suited to live in new contexts like mobile applications. Learn about these structured data features, custom plugin and theme development, and mobile device optimization.

Published in: Technology
  • Thoroughly enjoyed this presentation.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Structured Data in WordPress

  1. 1. Structured Datain WordPressRandy Hoyt
  2. 2. @randyhoyt #wctoAbout Me Randy Hoyt randyhoyt.com @randyhoyt Presentation randyhoyt.com/wcto
  3. 3. @randyhoyt #wcto WordPress Timeline May 2003 WordPress 0.7 − Initial Release − Blog Posts2003 2005 2007 2009 2011 2013 WordPress Now Available http://wordpress.org/news/2003/05/wordpress-now-available/
  4. 4. @randyhoyt #wcto WordPress Timeline May 2004 WordPress 1.2 − Randy’s first WordPress blog2003 2005 2007 2009 2011 2013
  5. 5. @randyhoyt #wcto WordPress TimelineFebruary 2005 WordPress 1.5 “The „pages‟ feature allows you to run − Pages − Custom Fields your entire site through WordPress.”2003 2005 2007 2009 2011 2013 Announcing WordPress 1.5 http://wordpress.org/news/2005/02/strayhorn/
  6. 6. @randyhoyt #wcto
  7. 7. @randyhoyt #wcto
  8. 8. @randyhoyt #wctoStructured DataWhat is it? “Data that resides in fixed fields within a record. “ Contrast with unstructured data.”PC Magazine Encyclopedia: Structured Datahttp://r2h.me/pcmagdata
  9. 9. @randyhoyt #wctoStructured DataStructured Unstructured
  10. 10. @randyhoyt #wcto WordPress Timeline June 2010 WordPress 3.0 − Custom Post Types2003 2005 2007 2009 2011 2013 WordPress 3.0 “Thelonious” http://wordpress.org/news/2010/06/thelonious/
  11. 11. @randyhoyt #wctoStructured DataWhy use it?1. Simple Adding / Editing2. Complex Formatting
  12. 12. @randyhoyt #wcto
  13. 13. @randyhoyt #wctoStructured DataWhy use it?1. Simple Adding / Updating2. Complex Formatting3. Data Integrity
  14. 14. @randyhoyt #wcto
  15. 15. @randyhoyt #wcto
  16. 16. @randyhoyt #wctoStructured DataWhy use it?1. Ease of Adding & Updating2. Complex Formatting3. Data Integrity4. Cross-Platform Delivery
  17. 17. @randyhoyt #wcto
  18. 18. @randyhoyt #wcto
  19. 19. @randyhoyt #wctoAdapting Ourselves to Adaptive Contenthttp://www.slideshare.net/KMcGrane/adapting-ourselves-to-adaptive-content-12133365
  20. 20. @randyhoyt #wctoAdapting Ourselves to Adaptive Contenthttp://www.slideshare.net/KMcGrane/adapting-ourselves-to-adaptive-content-12133365
  21. 21. @randyhoyt #wcto
  22. 22. @randyhoyt #wctoTheme vs. Plugin Where does this custom code belong?“ A common, yet unfortunate practice in the WordPress community involves filling theme functions.php files with tweaks and functionality that is key to a site.” Theme Functions File (functions.php) Custom Functionality Plugin • Code is executed just like a plugin • Completely separated from theme • Activated (or deactivated) along with • Remains activated even theme is not the theme • Best for code related to functionality • Best for code related to appearanceHow to create your own WordPress functionality pluginhttp://wpcandy.com/teaches/how-to-create-a-functionality-plugin
  23. 23. @randyhoyt #wcto
  24. 24. @randyhoyt #wcto
  25. 25. @randyhoyt #wctoWordPress Codex: Post Types > Custom Typeshttp://codex.wordpress.org/Post_Types#Custom_Types
  26. 26. @randyhoyt #wcto
  27. 27. @randyhoyt #wctoAptana, library uploaded, code for metaboxes
  28. 28. @randyhoyt #wcto
  29. 29. @randyhoyt #wctoCustom Fields wp_posts wp_postmeta ID post_type post_title post_id meta_key meta_value 37 rrh_assignment Final Project 37 date_due 12/07/2011 38 rrh_assignment Final Exam 37 percentage 24 38 date_due 12/14/2011 38 percentage 16
  30. 30. @randyhoyt #wctoCustom Fields
  31. 31. @randyhoyt #wctoCustom FieldsThree Ways to Customize the InterfaceTutorial: “Reusable Custom Meta Boxes” http://r2h.me/wpreuseablePlugin: Advanced Custom Fields http://wordpress.org/extend/plugins/advanced-custom-fields/Library: Custom Meta Boxes http://r2h.me/wpcmb
  32. 32. @randyhoyt #wctoLibrary: Custom Meta Boxeshttp://r2h.me/wpcmbCustom Meta Boxes allow you to build clean, understandableinterfaces for entering metadata. There’s a ton of field options:text, textarea, checkbox, dropdown list, WYSIWYG, and more.
  33. 33. @randyhoyt #wcto
  34. 34. @randyhoyt #wctoAdd Custom Meta Boxes to Your Pluginhttp://randyhoyt.com/wordpress/custom-meta-boxes-plugin/
  35. 35. @randyhoyt #wctoAdd Custom Meta Boxes to Your Pluginhttp://randyhoyt.com/wordpress/custom-meta-boxes-plugin/
  36. 36. @randyhoyt #wcto
  37. 37. @randyhoyt #wcto
  38. 38. @randyhoyt #wctoVideo, show fields, add values, save
  39. 39. @randyhoyt #wctoScreenshot of dashboard, all assignments addedOrdering WordPress Post Types By A Custom Fieldhttp://randyhoyt.com/wordpress/custom-post-type-ordering/
  40. 40. @randyhoyt #wcto
  41. 41. @randyhoyt #wcto
  42. 42. @randyhoyt #wcto
  43. 43. @randyhoyt #wcto
  44. 44. @randyhoyt #wcto
  45. 45. @randyhoyt #wcto
  46. 46. @randyhoyt #wctoWordPress Codex: Template Hierarchyhttp://codex.wordpress.org/Template_Hierarchy
  47. 47. @randyhoyt #wctoChild Theme ArchitectureA WordPress child theme is a theme that inherits thefunctionality of another theme, called the parenttheme, and allows you to modify or add functionality.Making a child theme is very simple. Create adirectory, put a properly formatted style.css file in it,and you have a child theme!WordPress Codex: Child Themeshttp://codex.wordpress.org/Child_Themes
  48. 48. @randyhoyt #wcto
  49. 49. @randyhoyt #wcto
  50. 50. @randyhoyt #wcto
  51. 51. @randyhoyt #wcto
  52. 52. @randyhoyt #wcto
  53. 53. @randyhoyt #wcto
  54. 54. @randyhoyt #wcto
  55. 55. @randyhoyt #wcto
  56. 56. @randyhoyt #wcto
  57. 57. @randyhoyt #wcto
  58. 58. @randyhoyt #wcto
  59. 59. @randyhoyt #wctoStructured DataWhy use it?1. Ease of Adding & Updating2. Complex Formatting3. Data Integrity4. Cross-Platform Delivery5. Logic-Based Automation
  60. 60. @randyhoyt #wctoShortcodesWhen a shortcode is inserted in WordPress, it isreplaced with appropriate dynamic content producedby a PHP function.Let’s say we want to show the most recent posts in agiven post. We could use something like this: [recent-posts]Smashing Magazine: WordPress Shortcodeshttp://r2h.me/wpshortcodes
  61. 61. @randyhoyt #wcto
  62. 62. @randyhoyt #wcto
  63. 63. @randyhoyt #wcto
  64. 64. @randyhoyt #wcto
  65. 65. @randyhoyt #wcto
  66. 66. @randyhoyt #wcto
  67. 67. @randyhoyt #wctoCSV Importerhttp://wordpress.org/extend/plugins/csv-importer/
  68. 68. Structured Datain WordPressRandy Hoyt randyhoyt.com @randyhoytPresentation randyhoyt.com/wcto #wcto

×