Doing more with Advanced Custom Fields


A few months ago, we covered the basics of Advanced Custom Fields, a powerful plugin for WordPress that enables you to expand the basic content editing fields supplied by default by WordPress website to display content on your website.

Going Pro

In this article, we’ll be taking a look at the more advanced features of Advanced Custom Fields. While Advanced Custom Fields offers a free plugin, there is also a Pro version which offers extended functionality.

Repeater Fields

The repeater field feature allows users to have access to repeatable content. This is useful in scenarios such as adding multiple content blocks. For example, the below screenshot uses a repeater field to create each of the content boxes. Each box has a heading field, image field and another text field for the main content.

Screenshot of an example of using Repeater Fields.

Flexible Content

The flexible content feature is similar to the repeater functionality, as it allows users to repeat content. What separates flexible content from a repeater field is that instead of repeating the same content, developers can set different types of content to be repeated. The user can select their desired content using a dropdown menu in the WordPress administration.

Gallery

The Gallery add-on for ACF allows you to add new and uploaded images to a collection ready to display on the front of your website. Useful for when you want to display many images inside a carousel.

Options Pages


You can create option pages for the WordPress administration to create page-independent custom fields. For example, we use option pages for global content such as content for the header and footer of the website.

ACF Add-on Plugins

Advanced Custom Fields has the ability for other developers to contribute extra features that the basic and PRO versions do not support out-of-the-box. Here is a list of some of the most useful ACF plugins that we have tried and tested on previous client projects.

ACF Image Crop

The ACF Image Crop add-on allows users to easily resize images upon upload to a blog post/page. When you resize an image, you are reducing the overall file size and ensuring the image fits perfectly into your website’s layout. Reducing the file size of an image is particularly important, as it means there is less data to download for the visitor, therefore your website will load quicker for them. The dimensions for the crop can be specified for each field, which is great for ensuring design consistency and also means that you don’t need to try to crop images to the correct size and aspect ratio prior to upload.

ACF Tables

ACF Tables.
Need to display content in a table? This plugin allows users to create tables via the ACF interface in the WordPress Administration.

ACF Table Field allows you to add and remove columns and rows, create headings for each column and move columns and rows via dragging.

Yoast integration with ACF

Yoast is a must-have plugin for WordPress to assist you with your SEO. It provides an analysis of your WordPress content and gives various elements a “traffic light” ranking system, letting you know how well optimised your content is for search engines and providing tips for improvement.

Unfortunately, Yoast does not support ACF out of the box as it’s analysis is based only on the main WordPress content area, and not any custom fields. The ACF Content Analysis for Yoast SEO extends the analysis to all ACF content, including flexible content and repeater fields.

ACF to REST API

ACF + REST plugin banner.
Finally, for those developers who are using front-end frameworks such as Vue.js then the ACF to REST API plugin is useful for accessing ACF content from the WordPress REST API.

We can integrate ACF Pro into any of our clients’ WordPress-powered websites. If you would like us to integrate ACF into your website then please get in touch with us on our website or call us on: 01785 250 222