Extending WordPress with Advanced Custom Fields

Posted September 2, 2014 by   in User Experience, Web Development, Wordpress Admin

When developing WordPress websites, we prefer not to use plugins because of security risks and compatibility concerns. However, there’s one plugin we simply couldn’t live without: Advanced Custom Fields. It is an integral part of our development process.

What is Advanced Custom Fields?

Advanced Custom Fields is a tool that gives the option for developers to extend WordPress by adding custom fields (with a title and description option), separate from the title field, text editor and featured image upload, to the edit screen and therefore, making it even more user-friendly for our partners. Custom fields, such as simple text inputs, textareas, text editors, image uploads, checkboxes, page link, galleries, etc., are available to be added to any page, post, custom post types, etc. The data from these fields is then pulled into the template files of our custom WordPress themes using HTML, PHP and even jQuery, so that the information can be displayed on the front-end or be used for queries.

Normally, when using WordPress, the user is given the title (page title) field, content field (a text editor), and featured image (image upload) field for every page or blog post. That means stylizing a page of content requires at minimum an intermediate knowledge of HTML; something that not everyone has. When we’re building websites, we like to take a look at the WordPress backend from the partner’s perspective and make inputting content as easy as possible when the website is launched and the partners take over the reigns. Advanced Custom Fields helps take the guesswork out for our partners when adding content to their posts and/or pages.

Proof that Advanced Custom Fields is Awesome

Recently, we built a website lead-generation website for Storage Solutions, where their clients can login to the website, create new company profiles, get project quotes, and access project quotes of current and past projects. All of this information is stored in and generated dynamically by custom fields added to user profiles and custom post types. We even used the information to automatically generate PDFs that are first emailed to the client and can be downloaded at a later date.

In another website we built recently for Reverie Estates, we were given the task of creating Estate pages with Apartments listings. We used Advanced Custom Fields to add a gallery field for the Estate taxonomy (among many other fields) and then added fields like # of bedrooms, availability true/false, amenities checkboxes, etc. to the Apartment custom post type within the Estate taxonomy.

On our own website, we built modules in a template based on the website design and used Advanced Custom Fields to let the user choose which module to display with radio buttons and dropdowns. For example, if they choose the radio button to show a call to action, conditional logic is used to show additional fields for the data needed for that call to action, such as text, button text, page link, and the background image. Then, that information is displayed on the specific page that those selections were made on.

Overall, WordPress is an amazing content management system as it is, but Advanced Custom Fields makes it even more powerful by allowing developers to cater it to the company that the website is being built for. We’re constantly finding new ways to improve WordPress’ backend and without Advanced Custom Fields, that might not be possible. So, ACF, we salute you.