Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting Started with Advanced Custom Fields Wor...

Getting Started with Advanced Custom Fields WordCamp Grand Rapids 2018

A 15-minute, lightning talk about what Advanced Custom Fields plugin is, what it does, and can do.

Avatar for Frederick Polk

Frederick Polk

June 30, 2018
Tweet

Other Decks in Programming

Transcript

  1. Hello Frederick Polk I build websites using WordPress and other

    Front End Development processes. Background Using WordPress since 2011. I enjoy ACF. 2
  2. What is ACF? Advanced Custom Fields is a plugin to

    extend metadata functionality to WordPress. It is a free plugin with a PRO version available to add additional functionality. Created by Elliot Condon from Melbourne, Australia. 3
  3. Why ACF? Advanced Custom Fields Instead of using WordPress' built

    in custom metabox feature, you can use ACF to set up advanced metadata functionality that writes to the database and can be retrieved anywhere in your WordPress install, including the REST api and Project Gutenberg. ACF also has a simple to use and powerful API. All within a very user-friendly interface with smart use of Javascript and PHP awesomeness. 4
  4. ACF Screens Advanced Custom Fields has a few screens that

    make the creation of field groups very pleasant and easy. • Field Groups • Field Group • List of default field types • Locations and Settings 6
  5. ACF Fields Advanced Custom Fields’ field types are robust and

    vast. They allow for content creation from galleries to multiple content layouts. Using the API, you can even create your own field types. With the PRO version, you can even repeat field types, create options sections for WordPress and more. 7
  6. ACF Add-ons Add-ons for Advanced Custom Fields are being depreciated.

    They are each $25 dollars per site. Repeater Field - Create a set of sub fields which can be repeated while editing content. Gallery Field - An interface for managing a collection of images. Options Page - Add extra admin pages to edit ACF fields. Flexible Content Field - A flexible content layout manager. With the PRO version, can get all of the add-ons built plus new field types such as Clone for the same price. 8
  7. ACF API Advanced Custom Fields’ API allows you to create

    very intricate and programmatic code that extends the functionality of, not only ACF, but of your WordPress site. You can even include ACF generated fields in your themes! Update delete_sub_field() update_field() Updates a field value. update_field($selector, $value, [$post_id]); delete_field() Deletes a field value. Delete _field($selector, [$post_id]); update_sub_field() Updates a sub field value. update_sub_field( $selector, $value, [$post_id] ); add_row() Adds a new row of data to an existing repeater / flexible content field value. add_row( $selector, $value, [$post_id] ); 9
  8. Our Demo 1. Installing the plugin. 2. Setting up ACF

    (free) plugin and configuring a field group. 3. Walking through the plugin screens. 4. Exporting our example. 5. Adding `PHP` code. 6. Viewing our work. 7. Installing ACF Pro and extending our example. 11