SlideShare a Scribd company logo
WordCamp DFW 2019WordCamp DFW 2019
Create Custom Page
Builders with ACF Blocks
Cory Webb • WordCamp DFW 2019
WordCamp DFW 2019
Today’s Agenda
1 Introduction
2 Gutenberg blocks
3 Advanced Custom Fields
4 Plan your layout
5 Create Blocks
6 Add pages
7 Questions?
WordCamp DFW 2019
Introduction
● Senior Full Stack Developer -
Reaktiv Studios
● Joomla guy turned WordPress
guy
● Texan born and raised
● Not affiliated in any way with
ACF
WordCamp DFW 2019
Gutenberg Blocks
● React components
● Requires Javascript
● Block UI and front end usually
handled in React components
WordCamp DFW 2019
Advanced Custom Fields
(ACF)
● UI for adding custom fields
● Dozens of field types
● Structured data stored in post
meta
● Rendered with PHP templates
● NOT a replacement for page
builders like Beaver Builder, Bold
Grid, etc.
WordCamp DFW 2019
Plan your layout
● Establish your content strategy
● Design the page
● Determine the types of blocks
you need
WordCamp DFW 2019
Creating Blocks with ACF Blocks
Create block
templates
Block templates handle both the editor
front-end output of each block type you
create.
Register blocks
Register your custom ACF blocks to let ACF
and Gutenberg know that the block exists.
Add fields
Add custom fields to your custom blocks to
enable the user to enter data to the block.
01
02
03
WordCamp DFW 2019
Create Block Templates
1. Templates render blocks on the
front end and in Gutenberg
2. Pick a place to put them
{YOUR_THEME}/template-parts/acf-blocks
3. Create a php template for each
block
WordCamp DFW 2019
Create Block Templates
Styling
1. Open your theme CSS
2. Edit the styles for each block
template
3. Styles applied to front end
and the editor
WordCamp DFW 2019
Register Blocks
1. Let ACF know about your
blocks
acf/init action
acf_register_block_type( $atts )
2. Block name
3. Block attributes
WordCamp DFW 2019
Add Fields in ACF
1. Add field group
(Prefix with “Block - “)
2. “Show this field group if”
Block is equal to {your block}
3. Add fields
WordCamp DFW 2019
Add Pages
1. Open the pages editor
2. Add a new page
3. Add your custom blocks to the
page
WordCamp DFW 2019
Questions?
@corywebb

More Related Content

What's hot

GDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat VideosGDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat Videos
Greg Schechter
 
Webpack and Web Performance Optimization
Webpack and Web Performance OptimizationWebpack and Web Performance Optimization
Webpack and Web Performance Optimization
Chen-Tien Tsai
 
JS digest. October 2017
JS digest. October 2017 JS digest. October 2017
JS digest. October 2017
ElifTech
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
Quentin Leonetti
 
Git sourcecontrolpreso
Git sourcecontrolpresoGit sourcecontrolpreso
Git sourcecontrolpreso
ColdFusionConference
 
Windows brings Docker Goodness - What does it mean for .NET developers?
Windows brings Docker Goodness - What does it mean for .NET developers?Windows brings Docker Goodness - What does it mean for .NET developers?
Windows brings Docker Goodness - What does it mean for .NET developers?
Naeem Sarfraz
 
Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortals
cgack
 
wp-cli and plugin development with future and past compatibility (Word Camp P...
wp-cli and plugin development with future and past compatibility (Word Camp P...wp-cli and plugin development with future and past compatibility (Word Camp P...
wp-cli and plugin development with future and past compatibility (Word Camp P...
Andreas - Creten
 
Simon Stewart, Facebook engineer - Building Facebook for Android
Simon Stewart, Facebook engineer - Building Facebook for AndroidSimon Stewart, Facebook engineer - Building Facebook for Android
Simon Stewart, Facebook engineer - Building Facebook for Android
How to Web
 
How to make your Webpack builds 10x faster
How to make your Webpack builds 10x fasterHow to make your Webpack builds 10x faster
How to make your Webpack builds 10x faster
trueter
 
Production optimization with React and Webpack
Production optimization with React and WebpackProduction optimization with React and Webpack
Production optimization with React and Webpack
k88hudson
 
Buildr - build like you code
Buildr -  build like you codeBuildr -  build like you code
Buildr - build like you code
Izzet Mustafaiev
 
Tooling for the productive front-end developer
Tooling for the productive front-end developerTooling for the productive front-end developer
Tooling for the productive front-end developer
Maurice De Beijer [MVP]
 
.Git for WordPress Developers
.Git for WordPress Developers.Git for WordPress Developers
.Git for WordPress Developers
mpvanwinkle
 
Reactjs workshop (1)
Reactjs workshop (1)Reactjs workshop (1)
Reactjs workshop (1)
Ahmed rebai
 
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
WordCamp Sydney
 
Tooling for the productive front end developer
Tooling for the productive front end developerTooling for the productive front end developer
Tooling for the productive front end developer
Maurice De Beijer [MVP]
 
The busy developers guide to Docker
The busy developers guide to DockerThe busy developers guide to Docker
The busy developers guide to Docker
Maurice De Beijer [MVP]
 
Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflow
Riccardo Coppola
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your plugin
Marko Heijnen
 

What's hot (20)

GDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat VideosGDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat Videos
 
Webpack and Web Performance Optimization
Webpack and Web Performance OptimizationWebpack and Web Performance Optimization
Webpack and Web Performance Optimization
 
JS digest. October 2017
JS digest. October 2017 JS digest. October 2017
JS digest. October 2017
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
 
Git sourcecontrolpreso
Git sourcecontrolpresoGit sourcecontrolpreso
Git sourcecontrolpreso
 
Windows brings Docker Goodness - What does it mean for .NET developers?
Windows brings Docker Goodness - What does it mean for .NET developers?Windows brings Docker Goodness - What does it mean for .NET developers?
Windows brings Docker Goodness - What does it mean for .NET developers?
 
Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortals
 
wp-cli and plugin development with future and past compatibility (Word Camp P...
wp-cli and plugin development with future and past compatibility (Word Camp P...wp-cli and plugin development with future and past compatibility (Word Camp P...
wp-cli and plugin development with future and past compatibility (Word Camp P...
 
Simon Stewart, Facebook engineer - Building Facebook for Android
Simon Stewart, Facebook engineer - Building Facebook for AndroidSimon Stewart, Facebook engineer - Building Facebook for Android
Simon Stewart, Facebook engineer - Building Facebook for Android
 
How to make your Webpack builds 10x faster
How to make your Webpack builds 10x fasterHow to make your Webpack builds 10x faster
How to make your Webpack builds 10x faster
 
Production optimization with React and Webpack
Production optimization with React and WebpackProduction optimization with React and Webpack
Production optimization with React and Webpack
 
Buildr - build like you code
Buildr -  build like you codeBuildr -  build like you code
Buildr - build like you code
 
Tooling for the productive front-end developer
Tooling for the productive front-end developerTooling for the productive front-end developer
Tooling for the productive front-end developer
 
.Git for WordPress Developers
.Git for WordPress Developers.Git for WordPress Developers
.Git for WordPress Developers
 
Reactjs workshop (1)
Reactjs workshop (1)Reactjs workshop (1)
Reactjs workshop (1)
 
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
 
Tooling for the productive front end developer
Tooling for the productive front end developerTooling for the productive front end developer
Tooling for the productive front end developer
 
The busy developers guide to Docker
The busy developers guide to DockerThe busy developers guide to Docker
The busy developers guide to Docker
 
Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflow
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your plugin
 

Similar to Create Custom Page Builders with Gutenberg and ACF Blocks

Cis363 a all ilabs devry university
Cis363 a all ilabs devry universityCis363 a all ilabs devry university
Cis363 a all ilabs devry university
CIS363A
 
Cis363 all i labs devry university
Cis363 all i labs devry universityCis363 all i labs devry university
Cis363 all i labs devry university
jkkjhdy798iyi
 
Cis363 a all ilabs devry university
Cis363 a all ilabs devry universityCis363 a all ilabs devry university
Cis363 a all ilabs devry university
CIS363A
 
Cis363 all i labs devry university
Cis363 all i labs devry universityCis363 all i labs devry university
Cis363 all i labs devry university
CIS363A
 
Cis 363 milestone 1 and 2
Cis 363 milestone 1 and 2Cis 363 milestone 1 and 2
Cis 363 milestone 1 and 2
helpido9
 
Jquery
JqueryJquery
2310 b 02
2310 b 022310 b 02
2310 b 02
Krazy Koder
 
Building plugins like a pro
Building plugins like a proBuilding plugins like a pro
Building plugins like a pro
Marko Heijnen
 
Web technology practical list
Web technology practical listWeb technology practical list
Web technology practical list
desaipratu10
 
Smu bca sem 5 summer 2015 assignments
Smu bca sem 5 summer 2015 assignmentsSmu bca sem 5 summer 2015 assignments
Smu bca sem 5 summer 2015 assignments
solved_assignments
 
getting started with java script
 getting started with java script  getting started with java script
getting started with java script
Kopi Maheswaran
 
Smu bca sem 5 winter 2015 assignments
Smu bca sem 5 winter 2015 assignmentsSmu bca sem 5 winter 2015 assignments
Smu bca sem 5 winter 2015 assignments
solved_assignments
 
Gutenberg (WidgiLabs Training Sessions)
Gutenberg  (WidgiLabs Training Sessions)Gutenberg  (WidgiLabs Training Sessions)
Gutenberg (WidgiLabs Training Sessions)
Nuno Morgadinho
 
It 236 it236
It 236 it236It 236 it236
It 236 it236
GOODCourseHelp
 
It 236 it236
It 236 it236It 236 it236
It 236 it236
GOODCourseHelp
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
sonumanoj
 
Event Driven Programming Course Outline.pptx
Event Driven Programming Course Outline.pptxEvent Driven Programming Course Outline.pptx
Event Driven Programming Course Outline.pptx
BekeleTsanga2
 
Brand Your Community Using Less and Gulp
Brand Your Community Using Less and GulpBrand Your Community Using Less and Gulp
Brand Your Community Using Less and Gulp
shujiui
 
Advanced HTML.PDF
Advanced HTML.PDFAdvanced HTML.PDF
Advanced HTML.PDF
Rath Smy
 
Between a Block & a Hard Place
Between a Block & a Hard PlaceBetween a Block & a Hard Place
Between a Block & a Hard Place
WP Engine
 

Similar to Create Custom Page Builders with Gutenberg and ACF Blocks (20)

Cis363 a all ilabs devry university
Cis363 a all ilabs devry universityCis363 a all ilabs devry university
Cis363 a all ilabs devry university
 
Cis363 all i labs devry university
Cis363 all i labs devry universityCis363 all i labs devry university
Cis363 all i labs devry university
 
Cis363 a all ilabs devry university
Cis363 a all ilabs devry universityCis363 a all ilabs devry university
Cis363 a all ilabs devry university
 
Cis363 all i labs devry university
Cis363 all i labs devry universityCis363 all i labs devry university
Cis363 all i labs devry university
 
Cis 363 milestone 1 and 2
Cis 363 milestone 1 and 2Cis 363 milestone 1 and 2
Cis 363 milestone 1 and 2
 
Jquery
JqueryJquery
Jquery
 
2310 b 02
2310 b 022310 b 02
2310 b 02
 
Building plugins like a pro
Building plugins like a proBuilding plugins like a pro
Building plugins like a pro
 
Web technology practical list
Web technology practical listWeb technology practical list
Web technology practical list
 
Smu bca sem 5 summer 2015 assignments
Smu bca sem 5 summer 2015 assignmentsSmu bca sem 5 summer 2015 assignments
Smu bca sem 5 summer 2015 assignments
 
getting started with java script
 getting started with java script  getting started with java script
getting started with java script
 
Smu bca sem 5 winter 2015 assignments
Smu bca sem 5 winter 2015 assignmentsSmu bca sem 5 winter 2015 assignments
Smu bca sem 5 winter 2015 assignments
 
Gutenberg (WidgiLabs Training Sessions)
Gutenberg  (WidgiLabs Training Sessions)Gutenberg  (WidgiLabs Training Sessions)
Gutenberg (WidgiLabs Training Sessions)
 
It 236 it236
It 236 it236It 236 it236
It 236 it236
 
It 236 it236
It 236 it236It 236 it236
It 236 it236
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
 
Event Driven Programming Course Outline.pptx
Event Driven Programming Course Outline.pptxEvent Driven Programming Course Outline.pptx
Event Driven Programming Course Outline.pptx
 
Brand Your Community Using Less and Gulp
Brand Your Community Using Less and GulpBrand Your Community Using Less and Gulp
Brand Your Community Using Less and Gulp
 
Advanced HTML.PDF
Advanced HTML.PDFAdvanced HTML.PDF
Advanced HTML.PDF
 
Between a Block & a Hard Place
Between a Block & a Hard PlaceBetween a Block & a Hard Place
Between a Block & a Hard Place
 

Recently uploaded

HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 
cyber crime.pptx..........................
cyber crime.pptx..........................cyber crime.pptx..........................
cyber crime.pptx..........................
GNAMBIKARAO
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
How to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdfHow to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdf
Infosec train
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
dtagbe
 

Recently uploaded (11)

HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 
cyber crime.pptx..........................
cyber crime.pptx..........................cyber crime.pptx..........................
cyber crime.pptx..........................
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
How to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdfHow to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdf
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
 

Create Custom Page Builders with Gutenberg and ACF Blocks

  • 1. WordCamp DFW 2019WordCamp DFW 2019 Create Custom Page Builders with ACF Blocks Cory Webb • WordCamp DFW 2019
  • 2. WordCamp DFW 2019 Today’s Agenda 1 Introduction 2 Gutenberg blocks 3 Advanced Custom Fields 4 Plan your layout 5 Create Blocks 6 Add pages 7 Questions?
  • 3. WordCamp DFW 2019 Introduction ● Senior Full Stack Developer - Reaktiv Studios ● Joomla guy turned WordPress guy ● Texan born and raised ● Not affiliated in any way with ACF
  • 4. WordCamp DFW 2019 Gutenberg Blocks ● React components ● Requires Javascript ● Block UI and front end usually handled in React components
  • 5. WordCamp DFW 2019 Advanced Custom Fields (ACF) ● UI for adding custom fields ● Dozens of field types ● Structured data stored in post meta ● Rendered with PHP templates ● NOT a replacement for page builders like Beaver Builder, Bold Grid, etc.
  • 6. WordCamp DFW 2019 Plan your layout ● Establish your content strategy ● Design the page ● Determine the types of blocks you need
  • 7. WordCamp DFW 2019 Creating Blocks with ACF Blocks Create block templates Block templates handle both the editor front-end output of each block type you create. Register blocks Register your custom ACF blocks to let ACF and Gutenberg know that the block exists. Add fields Add custom fields to your custom blocks to enable the user to enter data to the block. 01 02 03
  • 8. WordCamp DFW 2019 Create Block Templates 1. Templates render blocks on the front end and in Gutenberg 2. Pick a place to put them {YOUR_THEME}/template-parts/acf-blocks 3. Create a php template for each block
  • 9. WordCamp DFW 2019 Create Block Templates Styling 1. Open your theme CSS 2. Edit the styles for each block template 3. Styles applied to front end and the editor
  • 10. WordCamp DFW 2019 Register Blocks 1. Let ACF know about your blocks acf/init action acf_register_block_type( $atts ) 2. Block name 3. Block attributes
  • 11. WordCamp DFW 2019 Add Fields in ACF 1. Add field group (Prefix with “Block - “) 2. “Show this field group if” Block is equal to {your block} 3. Add fields
  • 12. WordCamp DFW 2019 Add Pages 1. Open the pages editor 2. Add a new page 3. Add your custom blocks to the page