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.
GUTENBERG TEMPLATES,
CPT’S AND ACF’S
ABOUT ME
QUALITY ASSURANCE SUPERVISOR, WEEVER APPS
FORMER INSTRUCTOR, SHERIDAN COLLEGE &
MOHAWK COLLEGE IN WEB DESIGN & DE...
AGENDA
• QUICK REVIEW OF CPT’S AND ACF’S
• INTRO TO GUTENBERG BLOCKS AND TEMPLATES
• CASE STUDY: REAL ESTATE
• DIFFERENCES...
CUSTOM POST TYPES
• Can act either as a Post or a Page (in theory)
• Can be organized by categories or tags (both built in...
LISTINGS IS THE CPT
USING THE PLUGIN METHOD, THIS WILL
SHOW UP IN THE SIDEBAR ON THE
DASHBOARD
SOME
EXAMPLES
OF CPT’S
ECommerce product
pages, such as
WooCommerce
Portfolio pages
Author Pages Movie/TV Series pages or
...
(ADVANCED) CUSTOM FIELDS
● In a standard post on WordPress, you have a “Title”. This is a
field.
● Custom Fields hold piec...
SOME EXAMPLES OF ACF’S ON A LISTING
HOW DO I KNOW WHICH WITCH IS WHICH?
CPT’S AND ACF’S
• CUSTOM FIELDS ANSWERS THE
QUESTION: WHAT IS THIS PIECE OF
DATA IN RE...
OUR REAL ESTATE EXAMPLE (CPT’S & ACF’S)
CUSTOM POST TYPE
• Listing: Every listing for a Real
Estate firm
CUSTOM FIELDS
• S...
OUR REAL ESTATE EXAMPLE
CUSTOM
POST TYPE
▹PROPERTY
LISTING
OUR REAL ESTATE EXAMPLE
CUSTOM
FIELDS
▹ADDRESS
▹PRICE
▹SQ. FT.
Address
OUR REAL ESTATE EXAMPLE (GUTENBERG)
TEMPLATE
• Listing: Every listing for
different houses that are
identical in a subdivi...
GUTENBERG
BLOCKS
A SINGLE BLOCK OR A COLLECTION OF RELATED
BLOCKS
SO WHAT’S THE BIG DIFFERENCE?
WHY WOULD I USE ONE AND NOT THE OTHER OR VICE-VERSA?
Photo by Adi Goldstein on Unsplash
NO CODE
ONE REQUIRES YOU TO CHANGE THE
TEMPLATE FOR THE DATA TO APPEAR ON
THE FRONT END (CPT’S AND ACF’S)
THE OTHER DISPLA...
IMDB - TV SERIES
What’s Different?
• Seasons
• Episodes
IMDB - MOVIES
What’s different?
• Release Date
IMDB - PERSON
What’s different?
• Date of Birth
• Date of Death (if applicable)
• Role (actor, director)
• Known for...
RESOURCES
WordPress 5 Essential
Training on Lynda.com
with Morten Rand-
Hendriksen
Custom Post Types on
Lynda.com with Mor...
ANY
QUESTIONS?
YOU CAN FIND ME AT:
@SHANTADOTCA
HTTP://SHANTA.CA
Upcoming SlideShare
Loading in …5
×

WordCamp Hamilton - CPT's vs Gutenberg Templates

53 views

Published on

In our last episode, dear campers, we learned about Custom Post Types (CPT’s) and Advanced Custom Fields (ACF’s) and why we need them. We had everything clear, right? Enter Gutenberg…

Until Gutenberg, we had to copy over content from one old post to the new. The other option is to use CPT’s and ACF’s. What’s the difference? When should you use one or the other… or BOTH?

In this session, we’ll take a quick review of CPT’s and ACF’s, then compare them to Gutenberg Blocks and Templates, and discuss when you should use each and why.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

WordCamp Hamilton - CPT's vs Gutenberg Templates

  1. 1. GUTENBERG TEMPLATES, CPT’S AND ACF’S
  2. 2. ABOUT ME QUALITY ASSURANCE SUPERVISOR, WEEVER APPS FORMER INSTRUCTOR, SHERIDAN COLLEGE & MOHAWK COLLEGE IN WEB DESIGN & DEVELOPMENT SERIAL WORDCAMPER. SPOKEN AT MORE THAN 30, INCLUDING ATTENDING MUMBAI, CO-ORGANIZER, WORDCAMP HAMILTON, 2015-19, TORONTO, 2015 AND MILWAUKEE, 2016 Photo by Kiera Howe of DragonTeach
  3. 3. AGENDA • QUICK REVIEW OF CPT’S AND ACF’S • INTRO TO GUTENBERG BLOCKS AND TEMPLATES • CASE STUDY: REAL ESTATE • DIFFERENCES • CASE STUDY: IMDB
  4. 4. CUSTOM POST TYPES • Can act either as a Post or a Page (in theory) • Can be organized by categories or tags (both built into WordPress already) or by your own organization (custom taxonomies) • Will show up as a different entry on the dashboard • Can be called in anywhere on your site
  5. 5. LISTINGS IS THE CPT USING THE PLUGIN METHOD, THIS WILL SHOW UP IN THE SIDEBAR ON THE DASHBOARD
  6. 6. SOME EXAMPLES OF CPT’S ECommerce product pages, such as WooCommerce Portfolio pages Author Pages Movie/TV Series pages or People pages on IMDB.com
  7. 7. (ADVANCED) CUSTOM FIELDS ● In a standard post on WordPress, you have a “Title”. This is a field. ● Custom Fields hold pieces of data that you want to show. In our example, perhaps Municipal Address of the property. ● Can hold different types of data, such as text or numbers. This is the smallest of the three concepts. ● Advanced Custom Fields (ACF’s) is a plugin
  8. 8. SOME EXAMPLES OF ACF’S ON A LISTING
  9. 9. HOW DO I KNOW WHICH WITCH IS WHICH? CPT’S AND ACF’S • CUSTOM FIELDS ANSWERS THE QUESTION: WHAT IS THIS PIECE OF DATA IN RELATION TO THE CPT? • CUSTOM POST TYPE ANSWERS THE QUESTION: WHAT IS THE CONTENT/LAYOUT? GUTENBERG • GUTENBERG BLOCK IS LIKE AN ACF • GUTENBERG TEMPLATES ARE LIKE CPT’S
  10. 10. OUR REAL ESTATE EXAMPLE (CPT’S & ACF’S) CUSTOM POST TYPE • Listing: Every listing for a Real Estate firm CUSTOM FIELDS • Sale Price • Rental Price • Size of the unit
  11. 11. OUR REAL ESTATE EXAMPLE CUSTOM POST TYPE ▹PROPERTY LISTING
  12. 12. OUR REAL ESTATE EXAMPLE CUSTOM FIELDS ▹ADDRESS ▹PRICE ▹SQ. FT. Address
  13. 13. OUR REAL ESTATE EXAMPLE (GUTENBERG) TEMPLATE • Listing: Every listing for different houses that are identical in a subdivision where the data is repeating or similar BLOCKS • Address (same street, different number) • Sale Price (same range, different number) • Size of the unit (could be the same)
  14. 14. GUTENBERG BLOCKS A SINGLE BLOCK OR A COLLECTION OF RELATED BLOCKS
  15. 15. SO WHAT’S THE BIG DIFFERENCE? WHY WOULD I USE ONE AND NOT THE OTHER OR VICE-VERSA? Photo by Adi Goldstein on Unsplash
  16. 16. NO CODE ONE REQUIRES YOU TO CHANGE THE TEMPLATE FOR THE DATA TO APPEAR ON THE FRONT END (CPT’S AND ACF’S) THE OTHER DISPLAYS CONTENT, BUT DOESN’T STORE THE DATA AS THAT DATA IN THE DATABASE, SUCH AS A NUMBER, OR CURRENCY Photo by Markus Spiske on Unsplash
  17. 17. IMDB - TV SERIES What’s Different? • Seasons • Episodes
  18. 18. IMDB - MOVIES What’s different? • Release Date
  19. 19. IMDB - PERSON What’s different? • Date of Birth • Date of Death (if applicable) • Role (actor, director) • Known for...
  20. 20. RESOURCES WordPress 5 Essential Training on Lynda.com with Morten Rand- Hendriksen Custom Post Types on Lynda.com with Morten Rand-Hendriksen Advanced Custom Fields on Lynda.com with Morten Rand-Hendriksen Posts & Pages, Categories & Tags - WordCamp Montreal 2015 How To Create Gutenberg Templates WTH are CPT’s and ACF's? - WordCamp Hamilton 2018
  21. 21. ANY QUESTIONS? YOU CAN FIND ME AT: @SHANTADOTCA HTTP://SHANTA.CA

×