SlideShare a Scribd company logo
1 of 25
Wil Brown
@DeveloperWil
zeropointdevelopment.com for WordPress Sydney
Introduction
Extends the post editor allowing easy
collection of different types of data
through specific field types.
Retrieve data from posts and build into
custom WordPress templates using PHP
functions.
@DeveloperWil #wpsyd
@DeveloperWil #wpsyd
• Develop sites for clients or yourself
• Working knowledge of HTML, CSS and PHP
• Understand WordPress templating
• Create websites that require flexible & dynamic
data input
@DeveloperWil #wpsyd
ACF v4.x is available for free on WordPress.org
https://wordpress.org/plugins/advanced-custom-fields/
@DeveloperWil #wpsyd
Basic
– Text
– Text Area
– Number
– Email
– Password
Content
– Wysiwig Editor
– Image
– File
@DeveloperWil #wpsyd
Choice
– Select
– Checkbox
– Radio Button
– True / False
Layout
– Message
– Tab
Relational
– Page Link
– Post Object
– Relationship
– Taxonomy
– User
@DeveloperWil #wpsyd
jQuery
– Google Map
– Date Picker
– Color Picker
ACF Pro v5.x includes extra fields & features.
https://www.advancedcustomfields.com/pro/
Costs: one-time payment, lifetime updates
AUD $25 for 1 site, AUD $100 for unlimited sites
@DeveloperWil #wpsyd
• Repeater Field
Create a set of sub fields which can be repeated again and again whilst editing
content.
• Gallery Field
The gallery field provides a simple and intuitive interface for managing a
collection of images.
• Flexible Content Field
The flexible content field is a complete content layout manager!
• Clone Field
Allows you to select and display existing fields.
@DeveloperWil #wpsyd
• Options Pages
Provides a set of functions to add extra admin pages.
• URL
Validates proper http:// https:// URIs
• Range
Number range.
• oEmbed
Embed videos, images, tweets, audio, and other content.
@DeveloperWil #wpsyd
• Link
Provides a simple way to select or define a link (url, title, target)
• Date Time Picker
Creates a jQuery date & time selection popup
• Time Picker
Creates a jQuery time selection popup.
• Group
Create a group of fields for consistent layout.
@DeveloperWil #wpsyd
ACF uses field groups to attach fields to posts.
Each field group contains a title, fields, location
rules and visual settings.
@DeveloperWil #wpsyd
Attaching field groups
@DeveloperWil #wpsyd
Validation is built-in for all fields.
All fields can be set to be “required”.
@DeveloperWil #wpsyd
Show fields based on field toggles or rule groups
@DeveloperWil #wpsyd
Google Map, Date Picker, Color Picker
@DeveloperWil #wpsyd
Documentation:
https://www.advancedcustomfields.com/resources
All field data saved as native post_meta. You can
use get_post_meta() however best practice to use
get_field() or the_field().
Why? Because ACF will format the value
depending on the field type and make
development quicker and easier!
@DeveloperWil #wpsyd
@DeveloperWil #wpsyd
<?php
/**
* Template Name: Home Page
*/
get_header();
?>
<div id="primary">
<div id="content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<h1><?php the_field('custom_title'); ?></h1>
<img src="<?php the_field('hero_image'); ?>" />
<p><?php the_content(); ?></p>
<?php endwhile; // end of the loop.
?>
<div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>
@DeveloperWil #wpsyd
Display a field
Retrieve a field as a variable
Using conditional statements
get_field returns false if (value == “” || value == null || value == false)
<p><?php the_field('field_name'); ?></p>
<?php
$variable = get_field('field_name’);
// do something with $variable
?>
<?php
if(get_field('field_name')){
echo '<p>' . get_field('field_name') . '</p>’;
}
?>
@DeveloperWil #wpsyd
The repeater field
repeater can be accessed by get_field or the_repeater_field / the_sub_field
<?php
if( have_rows('repeater_field_name') ): ?>
<ul>
<?php while( have_rows('repeater_field_name') ): the_row(); ?>
<li>sub_field_1 = <?php the_sub_field('sub_field_1'); ?></li>
<li>sub_field_2 = <?php the_sub_field('sub_field_2'); ?></li>
<?php
$sub_field_3 = get_sub_field('sub_field_3’);
// do something with $sub_field_3
?>
<?php endwhile; ?>
</ul>
<?php endif; ?>
@DeveloperWil #wpsyd
ACF can be extended and used alongside the WP
API.
• Actions & Filters
• Add-ons
• Creating new field types
• ACF to WP-API plugin
• Local JSON
• Synchronized JSON
@DeveloperWil #wpsyd
• ACF Documentation
• WordPress Melbourne User Group May 2013
Developer Meetup - Elliot Condon & Anthony
Cole
• Using Advanced Custom Fields within a
WordPress Custom Theme
• Jared Novack: Advanced Advanced
Custom Fields
[Front Cover] advancedcustomfields.com
[3] advancedcustomfields.com
[5] advancedcustomfields.com
[8] advancedcustomfields.com
[12] advancedcustomfields.com
[13] advancedcustomfields.com
[14] zeropointdevelopment.com
[15] zeropointdevelopment.com
[16] advancedcustomfields.com
[Back Cover] zeropointdevelopment.com
@DeveloperWil #wpsyd
▪ 20+ years in IT: Dev & SysOps
▪ WordPress Developer since 2008
▪ Plugins, APIs, Security & Systems Integrations
▪ Organiser WPSyd & WordCamp Sydney
zeropointdevelopment.com
@DeveloperWil
♥ Pizza & Craft Beer
@DeveloperWil #wpsyd
@DeveloperWil #wpsyd
@DeveloperWil

More Related Content

What's hot

Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress DeveloperJoey Kudish
 
OpenERP and Perl
OpenERP and PerlOpenERP and Perl
OpenERP and PerlOpusVL
 
Theme Wrangling 101
Theme Wrangling 101Theme Wrangling 101
Theme Wrangling 101mikeyarce
 
Custom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealCustom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealJoey Kudish
 
Creating Dynamic Sidebars & Widgets in WordPress
Creating Dynamic Sidebars & Widgets in WordPressCreating Dynamic Sidebars & Widgets in WordPress
Creating Dynamic Sidebars & Widgets in WordPressJason Yingling
 
Put a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastPut a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastOSCON Byrum
 
Ingo Muschenetz: Titanium Studio Deep Dive
Ingo Muschenetz: Titanium Studio Deep DiveIngo Muschenetz: Titanium Studio Deep Dive
Ingo Muschenetz: Titanium Studio Deep DiveAxway Appcelerator
 
Word press templates
Word press templatesWord press templates
Word press templatesDan Phiffer
 
Introduction to CouchDB
Introduction to CouchDBIntroduction to CouchDB
Introduction to CouchDBOpusVL
 
Perl in the Real World
Perl in the Real WorldPerl in the Real World
Perl in the Real WorldOpusVL
 
Advancing Your Custom Fields - WordCamp 2014
Advancing Your Custom Fields - WordCamp 2014Advancing Your Custom Fields - WordCamp 2014
Advancing Your Custom Fields - WordCamp 2014Carleton Web Services
 
Getting to know perch — and perch runway!
Getting to know perch — and perch runway!Getting to know perch — and perch runway!
Getting to know perch — and perch runway!Abigail Larsen
 
Perch CMS Summit: Perch Template Tips and Tricks
Perch CMS Summit: Perch Template Tips and TricksPerch CMS Summit: Perch Template Tips and Tricks
Perch CMS Summit: Perch Template Tips and TricksRachel Andrew
 
Software Development with Open Source
Software Development with Open SourceSoftware Development with Open Source
Software Development with Open SourceOpusVL
 
Creating Themes
Creating ThemesCreating Themes
Creating ThemesDaisyOlsen
 
Ruby conf 2011, Create your own rails framework
Ruby conf 2011, Create your own rails frameworkRuby conf 2011, Create your own rails framework
Ruby conf 2011, Create your own rails frameworkPankaj Bhageria
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentSitdhibong Laokok
 

What's hot (20)

Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress Developer
 
OpenERP and Perl
OpenERP and PerlOpenERP and Perl
OpenERP and Perl
 
Theme Wrangling 101
Theme Wrangling 101Theme Wrangling 101
Theme Wrangling 101
 
Rebrand WordPress Admin
Rebrand WordPress AdminRebrand WordPress Admin
Rebrand WordPress Admin
 
Custom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealCustom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp Montreal
 
Creating Dynamic Sidebars & Widgets in WordPress
Creating Dynamic Sidebars & Widgets in WordPressCreating Dynamic Sidebars & Widgets in WordPress
Creating Dynamic Sidebars & Widgets in WordPress
 
Put a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastPut a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going Fast
 
Ingo Muschenetz: Titanium Studio Deep Dive
Ingo Muschenetz: Titanium Studio Deep DiveIngo Muschenetz: Titanium Studio Deep Dive
Ingo Muschenetz: Titanium Studio Deep Dive
 
Word press templates
Word press templatesWord press templates
Word press templates
 
Introduction to CouchDB
Introduction to CouchDBIntroduction to CouchDB
Introduction to CouchDB
 
Perl in the Real World
Perl in the Real WorldPerl in the Real World
Perl in the Real World
 
Plugins unplugged
Plugins unpluggedPlugins unplugged
Plugins unplugged
 
Advancing Your Custom Fields - WordCamp 2014
Advancing Your Custom Fields - WordCamp 2014Advancing Your Custom Fields - WordCamp 2014
Advancing Your Custom Fields - WordCamp 2014
 
Getting to know perch — and perch runway!
Getting to know perch — and perch runway!Getting to know perch — and perch runway!
Getting to know perch — and perch runway!
 
Perch CMS Summit: Perch Template Tips and Tricks
Perch CMS Summit: Perch Template Tips and TricksPerch CMS Summit: Perch Template Tips and Tricks
Perch CMS Summit: Perch Template Tips and Tricks
 
Software Development with Open Source
Software Development with Open SourceSoftware Development with Open Source
Software Development with Open Source
 
Creating Themes
Creating ThemesCreating Themes
Creating Themes
 
Ruby conf 2011, Create your own rails framework
Ruby conf 2011, Create your own rails frameworkRuby conf 2011, Create your own rails framework
Ruby conf 2011, Create your own rails framework
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme Development
 
Flutter beyond hello world
Flutter beyond hello worldFlutter beyond hello world
Flutter beyond hello world
 

Similar to Introduction to Advanced Custom Fields

Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)Mike Schinkel
 
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress DevelopmentAdam Tomat
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond bloggingJulien Minguely
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5Kevin DeRudder
 
Using WordPress as your application stack
Using WordPress as your application stackUsing WordPress as your application stack
Using WordPress as your application stackPaul Bearne
 
Advanced Custom Fields - WordPress North East
Advanced Custom Fields - WordPress North EastAdvanced Custom Fields - WordPress North East
Advanced Custom Fields - WordPress North EastPeacock Carter Ltd
 
Advanced Custom Fields: Amazing Possibilities and Irritating Limitations
Advanced Custom Fields: Amazing Possibilities and Irritating LimitationsAdvanced Custom Fields: Amazing Possibilities and Irritating Limitations
Advanced Custom Fields: Amazing Possibilities and Irritating LimitationsEast Bay WordPress Meetup
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfonyFrancois Zaninotto
 
You're Doing it Wrong - WordCamp Atlanta
You're Doing it Wrong - WordCamp AtlantaYou're Doing it Wrong - WordCamp Atlanta
You're Doing it Wrong - WordCamp AtlantaChris Scott
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1Yoav Farhi
 
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018Adam Tomat
 
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)tompunk
 
Custom post-framworks
Custom post-framworksCustom post-framworks
Custom post-framworkswcto2017
 
Custom post-framworks
Custom post-framworksCustom post-framworks
Custom post-framworksKiera Howe
 
WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...Denise Williams
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)James Titcumb
 

Similar to Introduction to Advanced Custom Fields (20)

Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
 
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond blogging
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
 
Using WordPress as your application stack
Using WordPress as your application stackUsing WordPress as your application stack
Using WordPress as your application stack
 
Advanced Custom Fields - WordPress North East
Advanced Custom Fields - WordPress North EastAdvanced Custom Fields - WordPress North East
Advanced Custom Fields - WordPress North East
 
Advanced Custom Fields: Amazing Possibilities and Irritating Limitations
Advanced Custom Fields: Amazing Possibilities and Irritating LimitationsAdvanced Custom Fields: Amazing Possibilities and Irritating Limitations
Advanced Custom Fields: Amazing Possibilities and Irritating Limitations
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
Custom Fields & Custom Metaboxes Overview
Custom Fields & Custom Metaboxes OverviewCustom Fields & Custom Metaboxes Overview
Custom Fields & Custom Metaboxes Overview
 
You're Doing it Wrong - WordCamp Atlanta
You're Doing it Wrong - WordCamp AtlantaYou're Doing it Wrong - WordCamp Atlanta
You're Doing it Wrong - WordCamp Atlanta
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
 
Advanced Custom Fields Plugin
Advanced Custom Fields PluginAdvanced Custom Fields Plugin
Advanced Custom Fields Plugin
 
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018
 
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)
 
Mobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLsMobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLs
 
Custom post-framworks
Custom post-framworksCustom post-framworks
Custom post-framworks
 
Custom post-framworks
Custom post-framworksCustom post-framworks
Custom post-framworks
 
WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
 

Recently uploaded

Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of indiaimessage0108
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneCall girls in Ahmedabad High profile
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdfkeithzhangding
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 

Recently uploaded (20)

Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of india
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 

Introduction to Advanced Custom Fields

  • 2. Extends the post editor allowing easy collection of different types of data through specific field types. Retrieve data from posts and build into custom WordPress templates using PHP functions. @DeveloperWil #wpsyd
  • 4. • Develop sites for clients or yourself • Working knowledge of HTML, CSS and PHP • Understand WordPress templating • Create websites that require flexible & dynamic data input @DeveloperWil #wpsyd
  • 5. ACF v4.x is available for free on WordPress.org https://wordpress.org/plugins/advanced-custom-fields/ @DeveloperWil #wpsyd
  • 6. Basic – Text – Text Area – Number – Email – Password Content – Wysiwig Editor – Image – File @DeveloperWil #wpsyd Choice – Select – Checkbox – Radio Button – True / False Layout – Message – Tab
  • 7. Relational – Page Link – Post Object – Relationship – Taxonomy – User @DeveloperWil #wpsyd jQuery – Google Map – Date Picker – Color Picker
  • 8. ACF Pro v5.x includes extra fields & features. https://www.advancedcustomfields.com/pro/ Costs: one-time payment, lifetime updates AUD $25 for 1 site, AUD $100 for unlimited sites @DeveloperWil #wpsyd
  • 9. • Repeater Field Create a set of sub fields which can be repeated again and again whilst editing content. • Gallery Field The gallery field provides a simple and intuitive interface for managing a collection of images. • Flexible Content Field The flexible content field is a complete content layout manager! • Clone Field Allows you to select and display existing fields. @DeveloperWil #wpsyd
  • 10. • Options Pages Provides a set of functions to add extra admin pages. • URL Validates proper http:// https:// URIs • Range Number range. • oEmbed Embed videos, images, tweets, audio, and other content. @DeveloperWil #wpsyd
  • 11. • Link Provides a simple way to select or define a link (url, title, target) • Date Time Picker Creates a jQuery date & time selection popup • Time Picker Creates a jQuery time selection popup. • Group Create a group of fields for consistent layout. @DeveloperWil #wpsyd
  • 12. ACF uses field groups to attach fields to posts. Each field group contains a title, fields, location rules and visual settings. @DeveloperWil #wpsyd
  • 14. Validation is built-in for all fields. All fields can be set to be “required”. @DeveloperWil #wpsyd
  • 15. Show fields based on field toggles or rule groups @DeveloperWil #wpsyd
  • 16. Google Map, Date Picker, Color Picker @DeveloperWil #wpsyd
  • 17. Documentation: https://www.advancedcustomfields.com/resources All field data saved as native post_meta. You can use get_post_meta() however best practice to use get_field() or the_field(). Why? Because ACF will format the value depending on the field type and make development quicker and easier! @DeveloperWil #wpsyd
  • 18. @DeveloperWil #wpsyd <?php /** * Template Name: Home Page */ get_header(); ?> <div id="primary"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <h1><?php the_field('custom_title'); ?></h1> <img src="<?php the_field('hero_image'); ?>" /> <p><?php the_content(); ?></p> <?php endwhile; // end of the loop. ?> <div><!-- #content --> </div><!-- #primary --> <?php get_footer(); ?>
  • 19. @DeveloperWil #wpsyd Display a field Retrieve a field as a variable Using conditional statements get_field returns false if (value == “” || value == null || value == false) <p><?php the_field('field_name'); ?></p> <?php $variable = get_field('field_name’); // do something with $variable ?> <?php if(get_field('field_name')){ echo '<p>' . get_field('field_name') . '</p>’; } ?>
  • 20. @DeveloperWil #wpsyd The repeater field repeater can be accessed by get_field or the_repeater_field / the_sub_field <?php if( have_rows('repeater_field_name') ): ?> <ul> <?php while( have_rows('repeater_field_name') ): the_row(); ?> <li>sub_field_1 = <?php the_sub_field('sub_field_1'); ?></li> <li>sub_field_2 = <?php the_sub_field('sub_field_2'); ?></li> <?php $sub_field_3 = get_sub_field('sub_field_3’); // do something with $sub_field_3 ?> <?php endwhile; ?> </ul> <?php endif; ?>
  • 21. @DeveloperWil #wpsyd ACF can be extended and used alongside the WP API. • Actions & Filters • Add-ons • Creating new field types • ACF to WP-API plugin • Local JSON • Synchronized JSON
  • 22. @DeveloperWil #wpsyd • ACF Documentation • WordPress Melbourne User Group May 2013 Developer Meetup - Elliot Condon & Anthony Cole • Using Advanced Custom Fields within a WordPress Custom Theme • Jared Novack: Advanced Advanced Custom Fields
  • 23. [Front Cover] advancedcustomfields.com [3] advancedcustomfields.com [5] advancedcustomfields.com [8] advancedcustomfields.com [12] advancedcustomfields.com [13] advancedcustomfields.com [14] zeropointdevelopment.com [15] zeropointdevelopment.com [16] advancedcustomfields.com [Back Cover] zeropointdevelopment.com @DeveloperWil #wpsyd
  • 24. ▪ 20+ years in IT: Dev & SysOps ▪ WordPress Developer since 2008 ▪ Plugins, APIs, Security & Systems Integrations ▪ Organiser WPSyd & WordCamp Sydney zeropointdevelopment.com @DeveloperWil ♥ Pizza & Craft Beer @DeveloperWil #wpsyd