More Related Content


The Flexibility of WordPress

  1. The Flexibility of WordPress
  2. Multiple Content Types • Pages – Main site pages – Apply templates for advanced functionality – Are hierarchical (can have parent/child relationships) • Posts – Flexible for any content, anywhere – Tags and categories allow content segmentation – Not hierarchical • Custom Post Types – Provide a separate interface for totally custom content – Create if default Posts are in use already (ie. a blog) – OR for highly special content that doesn’t fit normal post schema (home page slider) – Can be hierarchical, but are not by default
  3. Page Templates • Used when layout or functionality doesn’t match the rest of the theme and cannot be added through the post editor • Examples – Highly specialized forms – Precisely placed elements, like maps – Single column instead of theme’s regular two – Specific scripts only needed on that page – Other special layouts – Members-only or other protected areas
  4. Implementing Page Templates • Two main ways – From Page Editor • Works only for Pages • End-user is able to change – With get_template_part() and a conditional statement • Done on a theme level • Provides way to get any template from anywhere, even if it’s just a small piece (like social media links or a gallery)
  5. Post Tags and Categories • Both provide a way to group and navigate content • Both are searchable and form archive pages by default • Categories – Umbrella groups for similar content topics – Are hierarchical (can have parent/child relationships) – Use to separate content but still use the default post editor • Tags – Like keywords – Especially useful for blogs to connect topics – Also useful for ecommerce • Analogy for Use – A book store would categorize by genre, but tag each book with the author
  6. Custom Taxonomies • Categories and Tags are “taxonomies” • Custom Taxonomies essentially work the same, but are more easily distinguishable • Book Store Example – “Genre” would be a custom taxonomy instead of using the default categories – “Author” would be created instead of using tags
  7. Custom Post Types (CPT) • Useful to make specialized content readily accessible to end-users • Can be made inaccessible by search, and therefore be used to insert and organize small bits of content – Example: Sliders • Only include the interface elements needed – ie. only the Title, Editor, and Featured Image and not Categories or Tags
  8. Custom Fields • Provide additional post meta for Posts or Pages via customized UI elements • Any form field can be used to get additional data • How to Use – DO use for variable data – DO use to make content easier for end-user to edit – DO use to insert content and retain theme styling – DO NOT use when the data needs to form relationships between posts/pages – use a taxonomy instead
  9. Custom Fields • Favorite Uses – Checkbox to mark as a featured post – Radio to place in a specific area – Checkboxes to add product features – A series of rich-editor enabled textareas to add content to a special layout (especially from CPT) – Extra upload for specific media display/output
  10. Creating CPT, Custom Taxonomies, and Custom Fields Demo of Easy Custom Post Types plugin
  11. Plan for Next Sessions • How to Get What You Want: Part I – Basic theme tags – The WordPress Loop, and how to Query • How to Get What You Want: Part II – Conditional Statements, Custom Fields, and get_template_part() • Helping the End User Part I – Shortcodes v. Custom Fields • Helping the End User Part II – Theme Options • Plugins and Functions – When to use – Functionality plugins vs. functions.php – Recommended plugins • Defending Themes From End-Users – Final setup of user accounts and training
  12. Resources • The WordPress Codex – Your new best friend, so go get friendly • Pages – – Page Templates • Create basic template: e_Templates • Post Types – About various post types
  13. Resources • Taxonomies – Basics refresher-on-custom-taxonomies – More on implementation stom-user-taxonomies-in-wordpress
  14. Resources • Taxonomies – Basics refresher-on-custom-taxonomies – More on implementation stom-user-taxonomies-in-wordpress
  15. Resources • Recommended RSS Feeds – Link to my Google Reader xml file (edit out one’s you already have, then import to your reader) wordpress-rss.xml