SlideShare a Scribd company logo
April 19, 2015
EastBayWP.com
Our Meetup.com Page
http://www.meetup.com/Eastbay-WordPress-Meetup/
Ongoing Sponsor: Page.ly
http://page.ly/
INTRODUCTIONS
1. Name
2. Company (if appropriate)
3. WordPress background
4. Favorite Premium Plugins
Advanced Custom Fields Pro
Amazing possibilities…
and a few limitations
What Is ACF?
• Intuitive UI for creating and managing
custom fields
• Free & Pro versions
• 20 field types
• Uses the_field(), get_field(),
the_sub_field(), and
get_sub_field() to retrieve field
content
• Shortcode: [acf
field="{$field_name}"]
http://www.advancedcustomfields.com/pro
Fields in Free Version
• Checkbox
• Color Picker
• Date Picker
• Google Map
• Image
• oEmbed
• Page Link
• Post Object
• Relationship
• Select
• Tab
• Taxonomy
• Text
• Textarea
• True/False
• Wysiwig Editor
Additional Fields in ACF Pro
The Repeater Field
The repeater field allows you to create a set of sub fields which can
be repeated again and again.
The Gallery Field
The gallery field provides a simple and intuitive interface for
managing a collection of images.
The Flexible Content Field
The flexible content field is a complete content layout manager.
Options Pages
All data saved on an options page is global and can be displayed on
any page.
How Much Does ACF Pro Cost?
One-time cost: $25 Personal, $100 Developer—Australian Dollars!
Create a Field Group
Select Field Group Location
You can choose to show your field groups
for pages, page templates, post types,
taxonomies, options pages, and widgets.
Set Field Group Options
This is handy if you want to hide the page/post
content editor when you display your fields.
Add Fields to Your Group
Display Your Fields
1. <?php
2. if(get_field('field_name')
) {
3. echo '<p>' .
get_field('field_name') .
'</p>';
4. }
5. ?>
CUSTOM HOME PAGE LAYOUT
Tutorial from Elliot Condon
Fields for this Layout
Entering the Content
Code for the Page Template
To see the code used to create this page
template in the Genesis Sample theme, go
to
http://acfdemo.rhymeswithsketch.com/co
de-for-condon-custom-page/
(There’s no way to show it in PowerPoint.)
CUSTOM HEADER RIGHT
CONTENT FOR PAGES
Tutorial from Sridhar Katakam
Add Field Group
Enter Header Right Content
This box appears below the main content
editor.
REPEATER FIELDS IN ACTION
Demonstrated on WP Fangirl
Create Field Group
Repeater Fields & Sub-Fields
Display Fields in Template
1. if(have_rows('premium_plugins')) {
2. echo '<h3 class="colophon">Premium
Plugins</h3>';
3. echo '<ul class="plugin-list">';
4. while(have_rows('premium_plugins')) {
5. the_row();
6. echo '<li><a
href="'.get_sub_field('premium_plugin_u
rl').'">'.
get_sub_field('premium_plugin_name')
.'</a></li>';
7. }
8. echo '</ul>';
9. }
DISPLAY ACF GALLERY AS SLIDER
Tutorial from Elliot Condon
Create a Gallery Field Group
Add Photos to Gallery
Upload images to the gallery field. These
are from Magdeleine.
Get FlexSlider.js
http://www.woothemes.com/flexslider/
Code Your Template
Updated instructions include proper
enqueuing of flexslider.js
Details at
http://acfdemo.rhymeswithsketch.com/gal
lery-slider-page-template-code/
PAGE WITH MAGNIFIC POPUP
GALLERY
Tutorial from Tribeswell.com
Get Magnific Files
Go to
http://dimsemenov.com/plugins/magnific-
popup/ and click “Build Tool”
Enqueue Magnific
1. function magnific_popup_files() {
2. wp_enqueue_style( 'magnific',
get_stylesheet_directory_uri() .
'/css/magnific-popup-gallery.css' );
3. wp_enqueue_script( 'magnific',
get_stylesheet_directory_uri()
.'/js/magnific-popup-
gallery.min.js', array('jquery'),
false, true );
4. }
5. add_action( 'wp_enqueue_scripts',
'magnific_popup_files' );
Create Page Template
1. <?php
2. /* Template Name: Page with Magnific Gallery */
3. add_action('genesis_entry_content', 'magnific_gallery_loop', 8);
4. function magnific_gallery_loop() {
5. $images = get_field('image_gallery');
6. if($images):
7. echo '<div class="popup-gallery">';
8. foreach( $images as $image ):
9. echo '<a href="'.$image['url'].'" class="lightbox-
link" title="'. $image['caption'].'" data-
description="'.$image['description'].'">';
10. echo '<div class="image-wrap"><img
src="'.$image['url'].'"></div></a>';
11. endforeach;
12. echo '</div>';
13. endif;
14. }
15. genesis();
Create Gallery Field Group
Or add existing gallery field group to new template.
Add Images to Gallery
Add Script to Page
• Put the JavaScript from the tutorial into
the “Script” metabox.
• Be sure to change “$” to “jQuery” for
non-conflict mode
Here’s Your Popup Lightbox
http://acfdemo.rhymeswithsketch.com/page-with-magnific-popup-gallery/
PAGE WITH CONTENT, WIDGET
AREA & FULL-WIDTH SECTIONS
Tutorial from Sridhar Katakam
Create Field Group
This page uses one flexible content field
with multiple layouts.
Add Page Content
HERO / CHECKERBOARD PAGE
Tutorial from Sridhar Katakam
Create Field Group
• Location
• Options
• Flexible Content
– Hero Layout
– Text-Image Layout
– Image-Text Layout
Location & Options
Flexible Content: Hero
Includes image, text , CTA Button Display,
CTA button URL, CTA button text
Text-Image & Image-Text
Entering Content
Layouts Don’t Style Themselves
You need to write CSS for things like
• Making section full-width
• Hero image stretch display
• Overlay for the hero image
• Positioning of hero text over image
• Color of hero text
• Width of Image & Text sections
FRONT-END POSTING & EDITING
Tutorial from The Stiz Media
Create Field Groups
Note Field Group IDs
This field group has an ID of 130, but
yours will be different.
Get Field Keys
Add Field Group IDs to Template
This is where you need to enter your own
field group IDs.
Add Field Keys to Template
Replace the keys shown in the demo
template with your own.
(Full template is too long to show.)
Apply Template to a Page
Content that you
add in the content
editor will appear
above the posting
form.
Fill Out the Posting Form
Voila! A Post
Just a Few Caveats
• ACF does not replace custom post types,
but it works well with them.
• Retrieving field data is harder than
retrieving CPT content.
• Fields created by ACF are stored either
in the post_meta table or the
wp_options table.
• You can’t search on custom fields
About the Presenter
Sallie Goetsch
(rhymes with ‘sketch’)
Got online in 1985. Started
building websites in 1995.
Discovered WordPress in 2005.
Organizer of the East Bay
WordPress Meetup.
@salliegoetsch
salliegoetsch
http://wpfangirl.com
510-969-9947

More Related Content

PDF
March 2015: Plugins Worth Paying For
East Bay WordPress Meetup
 
PDF
Sallie Goetsch: Making the Events Calendar Sit Up and Beg
East Bay WordPress Meetup
 
PPTX
Creating Customizable Widgets for Unpredictable Needs
Amanda Giles
 
PDF
WordPress Custom Fields: Control your content presentation by breaking out of...
Denise Williams
 
PPTX
Shortcodes vs Widgets: Which one and how?
Amanda Giles
 
PPTX
The Way to Theme Enlightenment
Amanda Giles
 
PDF
Wordpress 101 Training
Happy Marketer
 
PDF
Getting to know WordPress
Anthony Hortin
 
March 2015: Plugins Worth Paying For
East Bay WordPress Meetup
 
Sallie Goetsch: Making the Events Calendar Sit Up and Beg
East Bay WordPress Meetup
 
Creating Customizable Widgets for Unpredictable Needs
Amanda Giles
 
WordPress Custom Fields: Control your content presentation by breaking out of...
Denise Williams
 
Shortcodes vs Widgets: Which one and how?
Amanda Giles
 
The Way to Theme Enlightenment
Amanda Giles
 
Wordpress 101 Training
Happy Marketer
 
Getting to know WordPress
Anthony Hortin
 

What's hot (20)

PPS
Website hosting
ehnlive
 
PDF
WordPress 101 wcmelb 2013
Warren Denley
 
PPTX
Exploring the WordPress Dashboard and How to Pick & Install Plugins
Rich Plakas
 
PDF
WordPress Theme Structure
keithdevon
 
PDF
Building a website with WordPress
Anthony Montalbano
 
PPTX
WordPress Edmonton - Visual Composer
Kihya McComb
 
PPT
Wordpress as a CMS - WordCampNOLA
Marc Juneau
 
PDF
WordPress Theme Development Basics
Tech Liminal
 
PDF
How to Prepare a WordPress Theme for Public Release
David Yeiser
 
PDF
Getting to Know WordPress May 2015
Anthony Hortin
 
PPTX
Create a stunning, mobile friendly business website with the divi theme
Michelle Castillo
 
PPTX
Wordpress theme submission requirement for Themeforest
Enayet Rajib
 
PDF
Drag-and-drop WordPress Themes, featuring Themify Builder
East Bay WordPress Meetup
 
PPTX
Digital Marketing Tools
Sal Frosceno
 
PDF
Theme Wrangling 101
mikeyarce
 
PPT
Every Artist needs a Great Website: Getting Started with WordPress
Ruth Maude
 
PDF
Adding Content to your WordPress Website
RiceDesign
 
PPTX
Grow Beyond Posts & Pages: Introduction to the Pods Framework, a Content Mana...
podsframework
 
PDF
Creating a Website with WordPress.org
Eileen Lonergan
 
PDF
Setting up a blog with WordPress.com Jan 2014 Class
Eileen Lonergan
 
Website hosting
ehnlive
 
WordPress 101 wcmelb 2013
Warren Denley
 
Exploring the WordPress Dashboard and How to Pick & Install Plugins
Rich Plakas
 
WordPress Theme Structure
keithdevon
 
Building a website with WordPress
Anthony Montalbano
 
WordPress Edmonton - Visual Composer
Kihya McComb
 
Wordpress as a CMS - WordCampNOLA
Marc Juneau
 
WordPress Theme Development Basics
Tech Liminal
 
How to Prepare a WordPress Theme for Public Release
David Yeiser
 
Getting to Know WordPress May 2015
Anthony Hortin
 
Create a stunning, mobile friendly business website with the divi theme
Michelle Castillo
 
Wordpress theme submission requirement for Themeforest
Enayet Rajib
 
Drag-and-drop WordPress Themes, featuring Themify Builder
East Bay WordPress Meetup
 
Digital Marketing Tools
Sal Frosceno
 
Theme Wrangling 101
mikeyarce
 
Every Artist needs a Great Website: Getting Started with WordPress
Ruth Maude
 
Adding Content to your WordPress Website
RiceDesign
 
Grow Beyond Posts & Pages: Introduction to the Pods Framework, a Content Mana...
podsframework
 
Creating a Website with WordPress.org
Eileen Lonergan
 
Setting up a blog with WordPress.com Jan 2014 Class
Eileen Lonergan
 
Ad

Viewers also liked (20)

PPTX
Vane y cata 9 2
vanessapabontaborda
 
PPTX
Nationality words
Else Lamberg
 
PDF
Sistemas en WordPress: WPDB, Ajax, custom fields y otras magias
César Jefferson Aquino Maximiliano
 
PPTX
Jec1
jcaiche1985
 
PPTX
Build a Better Editing Experience with Advanced Custom Fields - #WCTO16
Jeseph Meyers
 
PDF
Website Redesign A-Z
Chris Remington
 
DOCX
Economia
CIAMINERA
 
PPTX
A Freelancer's Guide To Handling Difficult Clients
Damon Schopen
 
PPTX
Akeda bagus
Soipul Amri
 
PDF
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014
Mike Schinkel
 
ODP
My christmas
Antonella Cimo
 
PPTX
Goodbye Keyword Optimization, Hello Topical Optimization
Stoney deGeyter
 
PPTX
Dificultad de determinar la partida arancelaria para la exportación de prenda...
Mitzi Linares Vizcarra
 
PPTX
Ako zvýšiť návštevnosť na blogu - Fabulous by xKatka
Katarina Novotna
 
PPTX
Beginner's Guide to Creating an Epic Blog
Stoney deGeyter
 
PPTX
Contact Forms are Boring - 5 Creative Ways to Use Forms in WordPress
Adam W. Warner
 
PDF
[Farag fouda] kebenaran_yang_hilang_sisi_kelam_pr(book_fi.org)
Andang Prasetya
 
PPTX
How To See Through Your Business’s Blind Spots
Rachel Magario, MBA
 
PPTX
Carlos reyes investigacion-accion_31052016
Carlos Reyes
 
PDF
Shortcut Your Way to Success: Essential WordPress Plugins for Podcasters
Dustin Hartzler
 
Vane y cata 9 2
vanessapabontaborda
 
Nationality words
Else Lamberg
 
Sistemas en WordPress: WPDB, Ajax, custom fields y otras magias
César Jefferson Aquino Maximiliano
 
Build a Better Editing Experience with Advanced Custom Fields - #WCTO16
Jeseph Meyers
 
Website Redesign A-Z
Chris Remington
 
Economia
CIAMINERA
 
A Freelancer's Guide To Handling Difficult Clients
Damon Schopen
 
Akeda bagus
Soipul Amri
 
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014
Mike Schinkel
 
My christmas
Antonella Cimo
 
Goodbye Keyword Optimization, Hello Topical Optimization
Stoney deGeyter
 
Dificultad de determinar la partida arancelaria para la exportación de prenda...
Mitzi Linares Vizcarra
 
Ako zvýšiť návštevnosť na blogu - Fabulous by xKatka
Katarina Novotna
 
Beginner's Guide to Creating an Epic Blog
Stoney deGeyter
 
Contact Forms are Boring - 5 Creative Ways to Use Forms in WordPress
Adam W. Warner
 
[Farag fouda] kebenaran_yang_hilang_sisi_kelam_pr(book_fi.org)
Andang Prasetya
 
How To See Through Your Business’s Blind Spots
Rachel Magario, MBA
 
Carlos reyes investigacion-accion_31052016
Carlos Reyes
 
Shortcut Your Way to Success: Essential WordPress Plugins for Podcasters
Dustin Hartzler
 
Ad

Similar to Advanced Custom Fields: Amazing Possibilities and Irritating Limitations (20)

PDF
Advanced Custom Fields - Flexible Content
Norm Euker
 
PDF
Introduction to Advanced Custom Fields
Anthony Hortin
 
PPTX
Ultimate Guide to Advanced Custom Fields
Andrew Marks
 
PPTX
Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings
Ruth Cheesley
 
PPT
WCUK2013 - ACF Flexible Content and other cool stuff
Kirsty Burgoine
 
PPTX
Building Potent WordPress Websites
Kyle Cearley
 
PDF
Custom Fields & Custom Metaboxes Overview
East Bay WordPress Meetup
 
PPTX
Structuring Content in WordPress using Advanced Custom Fields
Jamie Schmid
 
PDF
Wordpress beyond blogging
Julien Minguely
 
PDF
WordCamp ABQ 2013: Making the leap from Designer to Designer/Developer
my easel
 
PDF
Introduction to Advanced Custom Fields
Zero Point Development
 
PPTX
Wordpress workflow for an agency world
Chris Lowe
 
PDF
Advanced Custom Fields - WordPress North East
Peacock Carter Ltd
 
PPTX
Getting a Quick Start with Visualforce
Mohammed Safwat Abu Kwaik
 
PDF
Spencer Nash - Advanced Custom Fields
dominicj
 
PPTX
Brand Your Community Using Less and Gulp
shujiui
 
PDF
Content Architecture
Dara Pressley
 
PDF
Accomplish It With Core: Sliders, Galleries and More
Andy Stratton
 
PDF
Newbies guide to customizing word press themes 25
New Tricks
 
PPTX
TopicHero Descriptions Tutorial
Justin Coven, Ph.D.
 
Advanced Custom Fields - Flexible Content
Norm Euker
 
Introduction to Advanced Custom Fields
Anthony Hortin
 
Ultimate Guide to Advanced Custom Fields
Andrew Marks
 
Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings
Ruth Cheesley
 
WCUK2013 - ACF Flexible Content and other cool stuff
Kirsty Burgoine
 
Building Potent WordPress Websites
Kyle Cearley
 
Custom Fields & Custom Metaboxes Overview
East Bay WordPress Meetup
 
Structuring Content in WordPress using Advanced Custom Fields
Jamie Schmid
 
Wordpress beyond blogging
Julien Minguely
 
WordCamp ABQ 2013: Making the leap from Designer to Designer/Developer
my easel
 
Introduction to Advanced Custom Fields
Zero Point Development
 
Wordpress workflow for an agency world
Chris Lowe
 
Advanced Custom Fields - WordPress North East
Peacock Carter Ltd
 
Getting a Quick Start with Visualforce
Mohammed Safwat Abu Kwaik
 
Spencer Nash - Advanced Custom Fields
dominicj
 
Brand Your Community Using Less and Gulp
shujiui
 
Content Architecture
Dara Pressley
 
Accomplish It With Core: Sliders, Galleries and More
Andy Stratton
 
Newbies guide to customizing word press themes 25
New Tricks
 
TopicHero Descriptions Tutorial
Justin Coven, Ph.D.
 

More from East Bay WordPress Meetup (20)

PDF
How to Conduct an SEO Audit
East Bay WordPress Meetup
 
PPTX
WordPress Membership Plugins: WP-Members
East Bay WordPress Meetup
 
PPTX
WordPress Membership Plugins: MemberPress
East Bay WordPress Meetup
 
PDF
How to Develop a Color Palette for Your Website with Amanada McCoy
East Bay WordPress Meetup
 
PDF
Event Management Plugins for WordPress
East Bay WordPress Meetup
 
PDF
Beyond Gravity Forms: Form Plugins for WordPress
East Bay WordPress Meetup
 
PDF
Is Your (Client's) Website Ready for 2017?
East Bay WordPress Meetup
 
PDF
Git Version Control for the Complete N00b by Adam LaBarge
East Bay WordPress Meetup
 
PDF
Making WordPress Easier to Use
East Bay WordPress Meetup
 
PDF
WordPress Comments (November Meetup)
East Bay WordPress Meetup
 
PDF
Rob La Gatta; Making the Events Calendar Sit Up and Beg
East Bay WordPress Meetup
 
PDF
Google Webmaster Tools for WordPress
East Bay WordPress Meetup
 
PDF
Introduction to Google Analytics by Katherine Mancuso
East Bay WordPress Meetup
 
PDF
iThemes Exchange: the New Kid on the WordPress E-Commerce Block
East Bay WordPress Meetup
 
PDF
Running a WordPress Business--Some Numbers
East Bay WordPress Meetup
 
PPTX
What Developers Need Designers to Know about WordPress
East Bay WordPress Meetup
 
PDF
Making WordPress Fly
East Bay WordPress Meetup
 
PDF
Drag and-Drop WordPress Themes
East Bay WordPress Meetup
 
PDF
Fun with WooCommerce
East Bay WordPress Meetup
 
PDF
Managed WordPress Hosting
East Bay WordPress Meetup
 
How to Conduct an SEO Audit
East Bay WordPress Meetup
 
WordPress Membership Plugins: WP-Members
East Bay WordPress Meetup
 
WordPress Membership Plugins: MemberPress
East Bay WordPress Meetup
 
How to Develop a Color Palette for Your Website with Amanada McCoy
East Bay WordPress Meetup
 
Event Management Plugins for WordPress
East Bay WordPress Meetup
 
Beyond Gravity Forms: Form Plugins for WordPress
East Bay WordPress Meetup
 
Is Your (Client's) Website Ready for 2017?
East Bay WordPress Meetup
 
Git Version Control for the Complete N00b by Adam LaBarge
East Bay WordPress Meetup
 
Making WordPress Easier to Use
East Bay WordPress Meetup
 
WordPress Comments (November Meetup)
East Bay WordPress Meetup
 
Rob La Gatta; Making the Events Calendar Sit Up and Beg
East Bay WordPress Meetup
 
Google Webmaster Tools for WordPress
East Bay WordPress Meetup
 
Introduction to Google Analytics by Katherine Mancuso
East Bay WordPress Meetup
 
iThemes Exchange: the New Kid on the WordPress E-Commerce Block
East Bay WordPress Meetup
 
Running a WordPress Business--Some Numbers
East Bay WordPress Meetup
 
What Developers Need Designers to Know about WordPress
East Bay WordPress Meetup
 
Making WordPress Fly
East Bay WordPress Meetup
 
Drag and-Drop WordPress Themes
East Bay WordPress Meetup
 
Fun with WooCommerce
East Bay WordPress Meetup
 
Managed WordPress Hosting
East Bay WordPress Meetup
 

Recently uploaded (20)

PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PPTX
LESSON-2-Roles-of-ICT-in-Teaching-for-learning_123922 (1).pptx
renavieramopiquero
 
PDF
Cybersecurity Awareness Presentation ppt.
banodhaharshita
 
PPTX
Crypto Recovery California Services.pptx
lionsgate network
 
PPTX
The Latest Scam Shocking the USA in 2025.pptx
onlinescamreport4
 
PDF
Slides: PDF Eco Economic Epochs for World Game (s) pdf
Steven McGee
 
PPTX
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
PPTX
Slides Powerpoint: Eco Economic Epochs.pptx
Steven McGee
 
PPTX
谢尔丹学院毕业证购买|Sheridan文凭不见了怎么办谢尔丹学院成绩单
mookxk3
 
PPTX
Parallel & Concurrent ...
yashpavasiya892
 
PPTX
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
PPT
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 
PDF
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
PPTX
Blue and Dark Blue Modern Technology Presentation.pptx
ap177979
 
PPTX
Perkembangan Perangkat jaringan komputer dan telekomunikasi 3.pptx
Prayudha3
 
PDF
BGP Security Best Practices that Matter, presented at PHNOG 2025
APNIC
 
PDF
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
PPTX
Black Yellow Modern Minimalist Elegant Presentation.pptx
nothisispatrickduhh
 
PPTX
How tech helps people in the modern era.
upadhyayaryan154
 
PDF
Latest Scam Shocking the USA in 2025.pdf
onlinescamreport4
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
LESSON-2-Roles-of-ICT-in-Teaching-for-learning_123922 (1).pptx
renavieramopiquero
 
Cybersecurity Awareness Presentation ppt.
banodhaharshita
 
Crypto Recovery California Services.pptx
lionsgate network
 
The Latest Scam Shocking the USA in 2025.pptx
onlinescamreport4
 
Slides: PDF Eco Economic Epochs for World Game (s) pdf
Steven McGee
 
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
Slides Powerpoint: Eco Economic Epochs.pptx
Steven McGee
 
谢尔丹学院毕业证购买|Sheridan文凭不见了怎么办谢尔丹学院成绩单
mookxk3
 
Parallel & Concurrent ...
yashpavasiya892
 
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
Blue and Dark Blue Modern Technology Presentation.pptx
ap177979
 
Perkembangan Perangkat jaringan komputer dan telekomunikasi 3.pptx
Prayudha3
 
BGP Security Best Practices that Matter, presented at PHNOG 2025
APNIC
 
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
Black Yellow Modern Minimalist Elegant Presentation.pptx
nothisispatrickduhh
 
How tech helps people in the modern era.
upadhyayaryan154
 
Latest Scam Shocking the USA in 2025.pdf
onlinescamreport4
 

Advanced Custom Fields: Amazing Possibilities and Irritating Limitations

  • 5. INTRODUCTIONS 1. Name 2. Company (if appropriate) 3. WordPress background 4. Favorite Premium Plugins
  • 6. Advanced Custom Fields Pro Amazing possibilities… and a few limitations
  • 7. What Is ACF? • Intuitive UI for creating and managing custom fields • Free & Pro versions • 20 field types • Uses the_field(), get_field(), the_sub_field(), and get_sub_field() to retrieve field content • Shortcode: [acf field="{$field_name}"] http://www.advancedcustomfields.com/pro
  • 8. Fields in Free Version • Checkbox • Color Picker • Date Picker • Google Map • Image • oEmbed • Page Link • Post Object • Relationship • Select • Tab • Taxonomy • Text • Textarea • True/False • Wysiwig Editor
  • 9. Additional Fields in ACF Pro The Repeater Field The repeater field allows you to create a set of sub fields which can be repeated again and again. The Gallery Field The gallery field provides a simple and intuitive interface for managing a collection of images. The Flexible Content Field The flexible content field is a complete content layout manager. Options Pages All data saved on an options page is global and can be displayed on any page.
  • 10. How Much Does ACF Pro Cost? One-time cost: $25 Personal, $100 Developer—Australian Dollars!
  • 11. Create a Field Group
  • 12. Select Field Group Location You can choose to show your field groups for pages, page templates, post types, taxonomies, options pages, and widgets.
  • 13. Set Field Group Options This is handy if you want to hide the page/post content editor when you display your fields.
  • 14. Add Fields to Your Group
  • 15. Display Your Fields 1. <?php 2. if(get_field('field_name') ) { 3. echo '<p>' . get_field('field_name') . '</p>'; 4. } 5. ?>
  • 16. CUSTOM HOME PAGE LAYOUT Tutorial from Elliot Condon
  • 17. Fields for this Layout
  • 19. Code for the Page Template To see the code used to create this page template in the Genesis Sample theme, go to http://acfdemo.rhymeswithsketch.com/co de-for-condon-custom-page/ (There’s no way to show it in PowerPoint.)
  • 20. CUSTOM HEADER RIGHT CONTENT FOR PAGES Tutorial from Sridhar Katakam
  • 22. Enter Header Right Content This box appears below the main content editor.
  • 23. REPEATER FIELDS IN ACTION Demonstrated on WP Fangirl
  • 25. Repeater Fields & Sub-Fields
  • 26. Display Fields in Template 1. if(have_rows('premium_plugins')) { 2. echo '<h3 class="colophon">Premium Plugins</h3>'; 3. echo '<ul class="plugin-list">'; 4. while(have_rows('premium_plugins')) { 5. the_row(); 6. echo '<li><a href="'.get_sub_field('premium_plugin_u rl').'">'. get_sub_field('premium_plugin_name') .'</a></li>'; 7. } 8. echo '</ul>'; 9. }
  • 27. DISPLAY ACF GALLERY AS SLIDER Tutorial from Elliot Condon
  • 28. Create a Gallery Field Group
  • 29. Add Photos to Gallery Upload images to the gallery field. These are from Magdeleine.
  • 31. Code Your Template Updated instructions include proper enqueuing of flexslider.js Details at http://acfdemo.rhymeswithsketch.com/gal lery-slider-page-template-code/
  • 32. PAGE WITH MAGNIFIC POPUP GALLERY Tutorial from Tribeswell.com
  • 33. Get Magnific Files Go to http://dimsemenov.com/plugins/magnific- popup/ and click “Build Tool”
  • 34. Enqueue Magnific 1. function magnific_popup_files() { 2. wp_enqueue_style( 'magnific', get_stylesheet_directory_uri() . '/css/magnific-popup-gallery.css' ); 3. wp_enqueue_script( 'magnific', get_stylesheet_directory_uri() .'/js/magnific-popup- gallery.min.js', array('jquery'), false, true ); 4. } 5. add_action( 'wp_enqueue_scripts', 'magnific_popup_files' );
  • 35. Create Page Template 1. <?php 2. /* Template Name: Page with Magnific Gallery */ 3. add_action('genesis_entry_content', 'magnific_gallery_loop', 8); 4. function magnific_gallery_loop() { 5. $images = get_field('image_gallery'); 6. if($images): 7. echo '<div class="popup-gallery">'; 8. foreach( $images as $image ): 9. echo '<a href="'.$image['url'].'" class="lightbox- link" title="'. $image['caption'].'" data- description="'.$image['description'].'">'; 10. echo '<div class="image-wrap"><img src="'.$image['url'].'"></div></a>'; 11. endforeach; 12. echo '</div>'; 13. endif; 14. } 15. genesis();
  • 36. Create Gallery Field Group Or add existing gallery field group to new template.
  • 37. Add Images to Gallery
  • 38. Add Script to Page • Put the JavaScript from the tutorial into the “Script” metabox. • Be sure to change “$” to “jQuery” for non-conflict mode
  • 39. Here’s Your Popup Lightbox http://acfdemo.rhymeswithsketch.com/page-with-magnific-popup-gallery/
  • 40. PAGE WITH CONTENT, WIDGET AREA & FULL-WIDTH SECTIONS Tutorial from Sridhar Katakam
  • 41. Create Field Group This page uses one flexible content field with multiple layouts.
  • 43. HERO / CHECKERBOARD PAGE Tutorial from Sridhar Katakam
  • 44. Create Field Group • Location • Options • Flexible Content – Hero Layout – Text-Image Layout – Image-Text Layout
  • 46. Flexible Content: Hero Includes image, text , CTA Button Display, CTA button URL, CTA button text
  • 49. Layouts Don’t Style Themselves You need to write CSS for things like • Making section full-width • Hero image stretch display • Overlay for the hero image • Positioning of hero text over image • Color of hero text • Width of Image & Text sections
  • 50. FRONT-END POSTING & EDITING Tutorial from The Stiz Media
  • 52. Note Field Group IDs This field group has an ID of 130, but yours will be different.
  • 54. Add Field Group IDs to Template This is where you need to enter your own field group IDs.
  • 55. Add Field Keys to Template Replace the keys shown in the demo template with your own. (Full template is too long to show.)
  • 56. Apply Template to a Page Content that you add in the content editor will appear above the posting form.
  • 57. Fill Out the Posting Form
  • 59. Just a Few Caveats • ACF does not replace custom post types, but it works well with them. • Retrieving field data is harder than retrieving CPT content. • Fields created by ACF are stored either in the post_meta table or the wp_options table. • You can’t search on custom fields
  • 60. About the Presenter Sallie Goetsch (rhymes with ‘sketch’) Got online in 1985. Started building websites in 1995. Discovered WordPress in 2005. Organizer of the East Bay WordPress Meetup. @salliegoetsch salliegoetsch http://wpfangirl.com 510-969-9947