Custom Fields are the inevitable part of practically every WordPress theme out there. These fields allow everyone to include extra information about the post, but unfortunately, this standard WP feature is quite raw. Beginners need some time to get accustomed to using custom fields and developers have to spend a lot of extra time when coding around them.
That’s the reason why Advanced Custom Fields (ACF) plugin is so popular among WordPress users all over the world. This free plugin counts more than 1 million active installs at this moment, and we don’t see why the number will start dropping. ACF allows you to to create powerful, professional and intuitive custom fields through a visual editor.
Although quite popular, ACF still requires coding knowledge and a lot of your time if you plan on implementing those fields in a theme. Yes, creating a field group is easy, but displaying those fields isn’t such a piece of cake. And that’s where ACF Theme Code steps in to save developers.
ACF Theme Code
This awesome plugin came into existence just a month ago, when two developers decided it’s time to stop wasting time on repeatedly writing the same code over and over again. When developing a theme or modifying an existing one, Advanced Custom Fields requires a developer to implement the right code in the right place within a theme. Since there was no easier way, a developer had to memorize snippet and all of the features of an API in order to do the work.
Aaron Rutley, one of the creators, explained on his blog:
“When implementing a field within a WordPress theme, it’s likely I’ll forget the field name, was it ‘profile_image’ or ‘profile_photo’ ? I’m also likely to forget how I’ve set that field to be returned, was it ID, URL or Array ? I found myself constantly editing the field group to find out.”
And this is where ACF Theme Code can help out a developer. After you install this free plugin which is now downloaded more than 500 times, you can save time when dealing with the code. Whenever you publish, edit or update a field group in Advanced Custom Fields, this amazing plugin will automatically generate code need for implementing the fields into any theme. You will find this code rendered at the bottom of the page. Next to each snippet, you’ll find a clipboard icon which will make it easy to copy the code. Now you don’t have to memorize anything and you can relax when working with custom fields.
Although the plugin is already a must-have for any developer out there, Aaron says they’re already planning to expand ACF Theme Code:
“We plan to add support for more popular third party fields in the future. We also plan to give developers more control over the code that’s generated.”
While the plugin is free when paired with the free version of ACF, you will need a PRO version if you use an extended version of Advanced Custom Fields. ACF Theme Code Pro generates code for all the other ACF Pro field types like the Clone, Gallery, Repeater and Flexible Content field.