SlideShare a Scribd company logo
1 of 34
Download to read offline
bit.ly/wpsydacf
@leocaseiro
ACF
ADVANCED CUSTOM FIELDS FOR WP - 101
http://bit.ly/wpsydacf
By /Leo Caseiro @leocaseiro
WHO AM I
Brazilian - Web Developer at - -IDM Renet IPMG
Translator: /WordPress PT-BR Tuts+
Community: /BR WP Forum WordPress Stackoverflow
WordPress Plugin Developer
WHY WP IS AWESOME?
NATIVE WP CUSTOM FIELDS
NATIVE WP CUSTOM FIELDS = MESS
ADVANCED CUSTOM FIELDS
ACF: TYPES OF FIELDS 4.4.2 (FREE)
ACF: FEATURES - VALIDATION
ACF: FEATURES - CONDITIONAL LOGIC
ACF: FEATURES - PREFIX - SUFIX - PLACEHOLDER
ACF: RELATIONAL
ACF: JQUERY - GMAPS, DATE PICKER, COLOR PICKER
ACF: NEED MORE? (EXTENSIONS)
ACF: STEP BY STEP - MOVIE DATABASE SITE
ACF: STEP BY STEP - MOVIE DB - TAB DETAILS
ACF: STEP BY STEP - CLASSIFICATION
ACF: STEP BY STEP - PREFIX, SUFIX AND PLACEHOLDER
ACF: STEP BY STEP - RELATIONAL
ACF: STEP BY STEP - CONDITIONAL LOGIC
ACF: STEP BY STEP - COUNTRY ACTOR + MOVIE
FRONTEND - DEMO https://github.com/leocaseiro/acf-movie-demo
SHOW ME SOME CODE
<p><?php the_field('country'); ?></p>
<?php $subtitle = get_field('country'); echo $subtitle; ?>
<?php
//get_post_meta() works, better to use the_field() and get_field()
echo get_post_meta( get_the_ID(), 'country', true );
?>
ACF documentation
FRONTEND - FROM DATEPICKER TO DATE I18N
<?php
$release_date = get_field( 'release_date' ); //Format: yyyymmdd
echo date_i18n( 'l, F j, Y', strtotime( $release_date ) );
?>
https://codex.wordpress.org/Function_Reference/date_i18n
FRONTEND - CONDITIONAL LOGIC
<?php if ( get_field( 'has_video' ) ) : ?>
<h3>Trailer</h3>
<?php the_field('trailer'); //oEmbed ?>
<hr>
<?php endif; ?>
http://www.advancedcustomfields.com/resources/code-examples/#using-conditional statements
FRONTEND - RELATIONAL PARENT (MOVIE)
<ul>
<?php $cast = get_field('cast');
foreach( $cast as $post): // var must be called $post (IMPORTANT)
setup_postdata( $post ); ?>
<li>
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
<?php the_post_thumbnail(); ?>
</a>
</li>
<?php wp_reset_postdata(); // IMPORTANT - reset the $post object
// so the rest of the page works correctly
endforeach;
?>
</ul>
http://www.advancedcustomfields.com/resources/code-examples/#using-conditional statements
FRONTEND - RELATIONAL CHILD (ACTOR)
get_posts()
<?php
$movies = get_posts( array(
'post_type' => 'movie',
'meta_query' => array(
array(
'key' => 'cast', // Field Name (ACF)
'value' => '"' . get_the_ID() . '"', //Leave ""
'compare' => 'LIKE'
)
)
));
?>
http://www.advancedcustomfields.com/resources/tutorials/querying-relationship-fields/
FRONTEND - RELATIONAL CHILD (ACTOR)
Show parents related
<ul>
<?php $movies = get_posts(...); //See Previous Slide
foreach( $movies as $post): // var must be called $post (IMPORTANT)
setup_postdata( $post ); ?>
<li>
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
<?php the_post_thumbnail(); ?>
</a>
</li>
<?php wp_reset_postdata(); // IMPORTANT - reset the $post object
// so the rest of the page works correctly
endforeach;
?>
</ul>
http://www.advancedcustomfields.com/resources/tutorials/querying-relationship-fields/
WHY ACF?
Doesn't create MySQL table
User Interface
900,000+
WP Way
Documentation
Support
similar Plugins at http://comparewp.org/
GO ACF PRO V5
ACF PRO - EXTRAS
Local JSON
Fields in Comments, Widget, Users
Validation PHP + AJAX
acf_form()
BEYOND THIS TALK
WordPress Plugins: Advanced Custom Fields
Jared Novack: Advanced Advanced Custom Fields
Using Advanced Custom Fields within a WordPress Custom Theme
Elliot Condon talks - WP Melbourne:
Story of Advanced Custom Field - May 2013
ACF 5 Walk-through - May 2014
ADVANCED USE
Actions and Filters
Creating a new field type
Extensions
ACF to WP-API Plugin
Local JSON
Syncronized JSON
http://www.advancedcustomfields.com/resources/
QUESTIONS?
CHEERS MATE!
By /Leo Caseiro @leocaseiro

More Related Content

What's hot

Alfresco global.properties
Alfresco global.propertiesAlfresco global.properties
Alfresco global.properties
NX21
 
Php Basic Security
Php Basic SecurityPhp Basic Security
Php Basic Security
mussawir20
 

What's hot (11)

Alfresco global.properties
Alfresco global.propertiesAlfresco global.properties
Alfresco global.properties
 
Php Basic Security
Php Basic SecurityPhp Basic Security
Php Basic Security
 
Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
 
Refactoring PHP/Symfony2 apps
Refactoring PHP/Symfony2 appsRefactoring PHP/Symfony2 apps
Refactoring PHP/Symfony2 apps
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
Session1+2
Session1+2Session1+2
Session1+2
 
Seasion5
Seasion5Seasion5
Seasion5
 
My Story With Flickr
My Story With FlickrMy Story With Flickr
My Story With Flickr
 
JSON and the APInauts
JSON and the APInautsJSON and the APInauts
JSON and the APInauts
 
Outside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and RspecOutside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and Rspec
 
Session3
Session3Session3
Session3
 

Viewers also liked

How To Embed SlideShare Shows Into WordPress.com
How To Embed SlideShare Shows Into WordPress.comHow To Embed SlideShare Shows Into WordPress.com
How To Embed SlideShare Shows Into WordPress.com
Kathy Gill
 
Five Killer Ways to Design The Same Slide
Five Killer Ways to Design The Same SlideFive Killer Ways to Design The Same Slide
Five Killer Ways to Design The Same Slide
Crispy Presentations
 
Why Content Marketing Fails
Why Content Marketing FailsWhy Content Marketing Fails
Why Content Marketing Fails
Rand Fishkin
 

Viewers also liked (20)

How To Embed SlideShare Shows Into WordPress.com
How To Embed SlideShare Shows Into WordPress.comHow To Embed SlideShare Shows Into WordPress.com
How To Embed SlideShare Shows Into WordPress.com
 
The Minimum Loveable Product
The Minimum Loveable ProductThe Minimum Loveable Product
The Minimum Loveable Product
 
How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)
How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)
How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)
 
The Seven Deadly Social Media Sins
The Seven Deadly Social Media SinsThe Seven Deadly Social Media Sins
The Seven Deadly Social Media Sins
 
Five Killer Ways to Design The Same Slide
Five Killer Ways to Design The Same SlideFive Killer Ways to Design The Same Slide
Five Killer Ways to Design The Same Slide
 
How People Really Hold and Touch (their Phones)
How People Really Hold and Touch (their Phones)How People Really Hold and Touch (their Phones)
How People Really Hold and Touch (their Phones)
 
Upworthy: 10 Ways To Win The Internets
Upworthy: 10 Ways To Win The InternetsUpworthy: 10 Ways To Win The Internets
Upworthy: 10 Ways To Win The Internets
 
What 33 Successful Entrepreneurs Learned From Failure
What 33 Successful Entrepreneurs Learned From FailureWhat 33 Successful Entrepreneurs Learned From Failure
What 33 Successful Entrepreneurs Learned From Failure
 
Design Your Career 2018
Design Your Career 2018Design Your Career 2018
Design Your Career 2018
 
Why Content Marketing Fails
Why Content Marketing FailsWhy Content Marketing Fails
Why Content Marketing Fails
 
The History of SEO
The History of SEOThe History of SEO
The History of SEO
 
How To (Really) Get Into Marketing
How To (Really) Get Into MarketingHow To (Really) Get Into Marketing
How To (Really) Get Into Marketing
 
The What If Technique presented by Motivate Design
The What If Technique presented by Motivate DesignThe What If Technique presented by Motivate Design
The What If Technique presented by Motivate Design
 
Displaying Data
Displaying DataDisplaying Data
Displaying Data
 
10 Powerful Body Language Tips for your next Presentation
10 Powerful Body Language Tips for your next Presentation10 Powerful Body Language Tips for your next Presentation
10 Powerful Body Language Tips for your next Presentation
 
Crap. The Content Marketing Deluge.
Crap. The Content Marketing Deluge.Crap. The Content Marketing Deluge.
Crap. The Content Marketing Deluge.
 
What Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating PresentersWhat Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
 
Digital Strategy 101
Digital Strategy 101Digital Strategy 101
Digital Strategy 101
 
How Google Works
How Google WorksHow Google Works
How Google Works
 
The Search for Meaning in B2B Marketing
The Search for Meaning in B2B MarketingThe Search for Meaning in B2B Marketing
The Search for Meaning in B2B Marketing
 

Similar to WordPress Advanced Custom Fields - 101

Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Tatsuhiko Miyagawa
 
Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)
LumoSpark
 
Laying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme developmentLaying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme development
Tammy Hart
 

Similar to WordPress Advanced Custom Fields - 101 (20)

Custom post-framworks
Custom post-framworksCustom post-framworks
Custom post-framworks
 
Using WordPress as your application stack
Using WordPress as your application stackUsing WordPress as your application stack
Using WordPress as your application stack
 
November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Teaming up WordPress API with Backbone.js in Titanium
Teaming up WordPress API with Backbone.js in TitaniumTeaming up WordPress API with Backbone.js in Titanium
Teaming up WordPress API with Backbone.js in Titanium
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press
 
Great Developers Steal
Great Developers StealGreat Developers Steal
Great Developers Steal
 
WordPress REST API hacking
WordPress REST API hackingWordPress REST API hacking
WordPress REST API hacking
 
Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)
 
WIRED and the WP REST API
WIRED and the WP REST APIWIRED and the WP REST API
WIRED and the WP REST API
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press
 
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle TwitterAugust 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle Twitter
 
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / WidgetsFVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / Widgets
 
Spyware/Malware FVCP
Spyware/Malware  FVCPSpyware/Malware  FVCP
Spyware/Malware FVCP
 
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
 
Symfony CMF - PHP Conference Brazil 2011
Symfony CMF - PHP Conference Brazil 2011Symfony CMF - PHP Conference Brazil 2011
Symfony CMF - PHP Conference Brazil 2011
 
Laying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme developmentLaying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme development
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

WordPress Advanced Custom Fields - 101

  • 1. bit.ly/wpsydacf @leocaseiro ACF ADVANCED CUSTOM FIELDS FOR WP - 101 http://bit.ly/wpsydacf By /Leo Caseiro @leocaseiro
  • 2. WHO AM I Brazilian - Web Developer at - -IDM Renet IPMG Translator: /WordPress PT-BR Tuts+ Community: /BR WP Forum WordPress Stackoverflow WordPress Plugin Developer
  • 3. WHY WP IS AWESOME?
  • 5. NATIVE WP CUSTOM FIELDS = MESS
  • 7. ACF: TYPES OF FIELDS 4.4.2 (FREE)
  • 8. ACF: FEATURES - VALIDATION
  • 9. ACF: FEATURES - CONDITIONAL LOGIC
  • 10. ACF: FEATURES - PREFIX - SUFIX - PLACEHOLDER
  • 12. ACF: JQUERY - GMAPS, DATE PICKER, COLOR PICKER
  • 13. ACF: NEED MORE? (EXTENSIONS)
  • 14. ACF: STEP BY STEP - MOVIE DATABASE SITE
  • 15. ACF: STEP BY STEP - MOVIE DB - TAB DETAILS
  • 16. ACF: STEP BY STEP - CLASSIFICATION
  • 17. ACF: STEP BY STEP - PREFIX, SUFIX AND PLACEHOLDER
  • 18. ACF: STEP BY STEP - RELATIONAL
  • 19. ACF: STEP BY STEP - CONDITIONAL LOGIC
  • 20. ACF: STEP BY STEP - COUNTRY ACTOR + MOVIE
  • 21. FRONTEND - DEMO https://github.com/leocaseiro/acf-movie-demo
  • 22. SHOW ME SOME CODE <p><?php the_field('country'); ?></p> <?php $subtitle = get_field('country'); echo $subtitle; ?> <?php //get_post_meta() works, better to use the_field() and get_field() echo get_post_meta( get_the_ID(), 'country', true ); ?> ACF documentation
  • 23. FRONTEND - FROM DATEPICKER TO DATE I18N <?php $release_date = get_field( 'release_date' ); //Format: yyyymmdd echo date_i18n( 'l, F j, Y', strtotime( $release_date ) ); ?> https://codex.wordpress.org/Function_Reference/date_i18n
  • 24. FRONTEND - CONDITIONAL LOGIC <?php if ( get_field( 'has_video' ) ) : ?> <h3>Trailer</h3> <?php the_field('trailer'); //oEmbed ?> <hr> <?php endif; ?> http://www.advancedcustomfields.com/resources/code-examples/#using-conditional statements
  • 25. FRONTEND - RELATIONAL PARENT (MOVIE) <ul> <?php $cast = get_field('cast'); foreach( $cast as $post): // var must be called $post (IMPORTANT) setup_postdata( $post ); ?> <li> <a href="<?php the_permalink(); ?>"> <?php the_title(); ?> <?php the_post_thumbnail(); ?> </a> </li> <?php wp_reset_postdata(); // IMPORTANT - reset the $post object // so the rest of the page works correctly endforeach; ?> </ul> http://www.advancedcustomfields.com/resources/code-examples/#using-conditional statements
  • 26. FRONTEND - RELATIONAL CHILD (ACTOR) get_posts() <?php $movies = get_posts( array( 'post_type' => 'movie', 'meta_query' => array( array( 'key' => 'cast', // Field Name (ACF) 'value' => '"' . get_the_ID() . '"', //Leave "" 'compare' => 'LIKE' ) ) )); ?> http://www.advancedcustomfields.com/resources/tutorials/querying-relationship-fields/
  • 27. FRONTEND - RELATIONAL CHILD (ACTOR) Show parents related <ul> <?php $movies = get_posts(...); //See Previous Slide foreach( $movies as $post): // var must be called $post (IMPORTANT) setup_postdata( $post ); ?> <li> <a href="<?php the_permalink(); ?>"> <?php the_title(); ?> <?php the_post_thumbnail(); ?> </a> </li> <?php wp_reset_postdata(); // IMPORTANT - reset the $post object // so the rest of the page works correctly endforeach; ?> </ul> http://www.advancedcustomfields.com/resources/tutorials/querying-relationship-fields/
  • 28. WHY ACF? Doesn't create MySQL table User Interface 900,000+ WP Way Documentation Support similar Plugins at http://comparewp.org/
  • 30. ACF PRO - EXTRAS Local JSON Fields in Comments, Widget, Users Validation PHP + AJAX acf_form()
  • 31. BEYOND THIS TALK WordPress Plugins: Advanced Custom Fields Jared Novack: Advanced Advanced Custom Fields Using Advanced Custom Fields within a WordPress Custom Theme Elliot Condon talks - WP Melbourne: Story of Advanced Custom Field - May 2013 ACF 5 Walk-through - May 2014
  • 32. ADVANCED USE Actions and Filters Creating a new field type Extensions ACF to WP-API Plugin Local JSON Syncronized JSON http://www.advancedcustomfields.com/resources/
  • 34. CHEERS MATE! By /Leo Caseiro @leocaseiro