Grow Beyond Posts & Pages: Introduction to the Pods Framework

7aeb9b63432353cb667c415b602b3817?s=47 Jim True
August 03, 2017

Grow Beyond Posts & Pages: Introduction to the Pods Framework

Presented at Wordpress St. Petersburg by Jim True

We give an introduction to data driven, content rich websites using the Pods Framework. Learn how to incorporate custom post types and custom fields and connect them with powerful relationships using Pods.

Video: https://youtu.be/fxpH68u3sgw

7aeb9b63432353cb667c415b602b3817?s=128

Jim True

August 03, 2017
Tweet

Transcript

  1. Grow Beyond Posts & Pages Introduction to the Pods Framework


    A Content Development Framework for WordPress
  2. Jim True Support Lead & Community Manager
 Pods Framework pods.io

    | @podsframework jimtrue.com | @jimtrue
  3. Our Story Starts with YOU, a WordPress Developer

  4. Well, NOW you’re a WordPress Developer

  5. You’ve got a handful of Websites under your belt GYM

    SALON MUSEUM
  6. The Gym has gone Franchise crazy GYM

  7. The Salon expanded into Spa Services SALON

  8. The Museum added a Local Artists Program MUSEUM

  9. You could try throwing plugins or themes at the problem

  10. Or you could try managing with Pages…   

     STAFF SCHEDULE CLASSES
  11. What if this was much easier?    

    STAFF SCHEDULE CLASSES 
  12. Pods to the RESCUE!

  13. Manage all your content in one place

  14. Create, Extend & add Fields to ANY Content Custom Post

    Types Custom Taxonomies Users Menus Posts Pages Comments WooCommerce ANY Plugin Post Type or Taxonomy
  15. Use Relationships to connect anything     STAFF

    SCHEDULE CLASSES Trainer Teaches a Spin Class On Mondays
  16. Display Content in your Theme without code* *HTML & CSS,

    yes, but not PHP Works in Shortcodes, Widgets & Auto Templates
  17. The Pods Process Pods Plan Populate Prototype 

  18. PLAN: Start with your Content Needs    

    STAFF LOCATIONS Gym #60 Honolulu, Hawaii
 555-1212
 info@hawaii.gym.io
 Trainers: Jim True Jim True jim@hawaii.gym.io
 Honolulu, Hawaii
 555-1212
 Classes: Yoga, Spin
  19. Think about reusable Content as DATA    

    STAFF LOCATIONS Gym #60 Honolulu, Hawaii
 555-1212
 info@hawaii.gym.io
 Trainers: Jim True Jim True jim@hawaii.gym.io
 Honolulu, Hawaii
 555-1212
 Classes: Yoga, Spin Locations City State Address Phone Email Address Trainers Staff Name Email Address Classes Taught Gym Location
  20. These are Custom Post Types & Custom Fields Locations City

    State Address Phone Email Address Trainers Staff Name Email Address Classes Taught Gym Location Post Types locations staff post_type meta_key locations city locations state locations address locations phone locations email staff full_name staff email staff classes_taught staff gym_location Custom Fields
  21. What are Custom Post Types? post_type WP Object post Posts

    page Pages attachment Media nav_menu_item Menus From the WordPress Codex:
 https://codex.wordpress.org/Post_Types
  22. The WordPress Way: register_post_type & register_meta function register_locations { register_post_type(

    'locations', array( 'labels' => array( 'name' => __( 'Locations' ), 'singular_name' => __( 'Location' ) ), 'public' => true, 'has_archive' => true, 'rewrite' => array('slug' => 'locations'), ) ); }
 add_action( ‘init’, ‘register_locations’); register_post_type https://codex.wordpress.org/Function_Reference/register_post_type/ register_meta $args = array( 'sanitize_callback' => 'sanitize_my_meta_key', 'auth_callback' => 'authorize_my_meta_key', 'type' => 'string', 'description' => ‘Enter Address', 'single' => true, 'show_in_rest' => true, ); register_meta( 'locations', ‘street_address’, $args ); https://codex.wordpress.org/Function_Reference/register_meta/
  23. The Pods Way: Add New & Add Fields Add New

    Pod Add Field to the Pod
  24. DEMO: Creating Pods

  25. PLAN: Identify your Connections     STAFF LOCATIONS

  26. Relationships prevent Double-Entry     STAFF Full Name

    Email Location Classes Jim True jim@gym.io Hawaii Yoga, Spin Betty Rubble betty@gym.io Hawaii Spin, Rumba Barney Rubble barney@gym.io Alaska Rock Throwing Fred Flintstone fred@gym.io Alaska Rock Throwing, Rumba
  27. Connected Fields are the Relationships Locations City State Address Phone

    Email Address Trainers Staff Name Email Address Classes Taught Gym Location Classes Name Description Instructor Location can have multiple Trainers Trainers can teach multiple Classes
  28. Understanding Relationship Connections Locations Trainers Staff Classes Taught Gym Location

    Classes Instructor Location can have multiple Trainers Trainers can teach multiple Classes Multiple Single M : 1 Multiple Single M : 1
  29. DEMO: Relationship Fields

  30. Treat your content like a Mail Merge instructor_name email_address Jim

    True jim@gym.io Betty Rubble betty@gym.io Barney Rubble barney@gym.io Fred Flintstone fred@gym.io Trainers Instructor: <merge field: instructor_name> Email: <merge field: email_address> Howdy <merge field: instructor_name> Spreadsheet Mail Merge Template
  31. Pods Templates & Magic Tags post_title email_address Jim True jim@gym.io

    Betty Rubble betty@gym.io Barney Rubble barney@gym.io Fred Flintstone fred@gym.io Trainers Instructor: {@post_title} Email: {@email_address} Howdy {@post_title} post_type: trainers Pods Template
  32. Calling a Custom Template with Shortcode Custom Template Instructor: {@post_title}

    Email: {@email_address} Howdy {@post_title} Pods Template Shortcode [pods name=“trainers” limit=“-1”] <p>Instructor: {@post_title}<br /> Email: {@email_address}</p> <p>Howdy {@post_title}</p> [/pods] post_type: trainers
  33. Creating a Pods Template Create saved “Content Blocks” to re-use

    throughout your theme
  34. Calling a Pods Template with Shortcode Instructor: {@post_title} Email: {@email_address}

    Howdy {@post_title} Template: Email Header Shortcode [pods name=“trainers” limit=“-1”
 template=“Email Header”] post_type: trainers
  35. Special Magic Tag Handling Field Type Magic Tag Custom Field

    {@custom_field} Relationship Connection {@related_field.field_in_other_pod} WordPress “Content” {@post_content} WordPress “Featured Image” {@post_thumbnail} Permalink {@permalink} Related Record Permalink {@related_field.permalink}
  36. Template Tags in Pods Templates If this field display else

    display that Conditionals & Loops Template Tag [if field_name]
 … content
 [else] … content
 [/if] Loop through EACH related record [each related_field] … related content [/each] [if staff_member]
 <ul id=“staff”> [each staff_member] <li>{@post_title}</li> [/each] </ul> [else] No Staff Found! [/if] Example
  37. Pods Templates with Auto Templates Replaces “the_content” With your Pods

    Template Automatically in your theme
 
 Or you can output before or After “the_content”
  38. DEMO: Prototyping with Pods Templates

  39. What else can you do with Pods? Custom Settings Pages

    Great for common text used throughout the website, phone numbers, business hours, or address.
  40. What else can you do with Pods? Extending Users, Media

    or Other Plugins Allows you to add content where you couldn’t before or connect those plugins to your new content.
  41. What else can you do with Pods? Connect with PHP

    or REST API or Pods API We support WordPress Core Methods of communicating with the content created with Pods, the new REST API methods or our own internal API for flexible connection methods.
  42. Getting Help with Pods Installing: https://wordpress.org/plugins/pods/ Support Forum: https://wordpress.org/support/plugins/pods/ Documentation:

    https://pods.io/docs/ Slack Chat: https://pods.io/chat/ #support channel
  43. We are a FREE Plugin with FREE Support Learn more

    @ https://friends.pods.io/
  44. Jim True Support Lead & Community Manager
 Pods Framework http://pods.io

    | @podsframework http://jimtrue.com | @jimtrue
  45. WordPress St Petersburg Meetups Monthly in St Pete @ Iron

    Yard
 1st & 2nd Thursdays every Month http://tampabaywp.org | @tampabaywp Slack Chat | Facebook Group | Meetup
  46. A VERY Heartfelt Thank you to Iron Yard St. Pete

    Last Meetup here in September Iron Yard St. Pete | @theironyard #tampabay