PHPackages                             fryiee/acf-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fryiee/acf-helper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fryiee/acf-helper
=================

A composer package for programmatically adding ACF fields to your Wordpress site.

0.1.7(6y ago)73.0k1MITPHP

Since Jul 4Pushed 6y ago2 watchersCompare

[ Source](https://github.com/fryiee/acf-helper)[ Packagist](https://packagist.org/packages/fryiee/acf-helper)[ RSS](/packages/fryiee-acf-helper/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (10)Used By (0)

ACF Helper
==========

[](#acf-helper)

A composer package for programmatically adding ACF fields to your Wordpress site.

Why use this package?
---------------------

[](#why-use-this-package)

Elliott Condon's Advanced Custom Fields is an amazing plugin for enhancing the content on a Wordpress site. However, programmatically adding fields is a cumbersome process, requiring writing multiple nested arrays, or creating the field group first in the plugin itself then exporting the code (with the end result still being a huge web of arrays).

This package aims to reduce the amount of field boilerplate diluting your theme's code by simplifying the process of registering field groups and fields programmatically.

Requirements
------------

[](#requirements)

- Composer
- Advanced Custom Fields Wordpress plugin
- Advanced Custom Fields Pro or the Field Type addon plugins if you plan to use premium field types.

Installation
------------

[](#installation)

You can use Composer to add the package to your project by using `composer require fryiee/acf-repeater:0.1.*` or adding `fryiee/acf-repeater:0.1.*` directly to the composer.json.

Add the package to your functions.php or similar theme file (such as a TimberSite class file) by adding `use Fryiee\ACF\Helper as ACFHelper` to the top of the file.

Basic Example
-------------

[](#basic-example)

```
$fieldGroup = ACFHelper::createFieldGroup('Example Field Group', '_a_suffix_to_the_group_key');
$fieldGroup->addLocation('post_type', '==', 'post');
$field = ACFHelper::createField('text', 'Example Field', ['required' => 1], '_a_suffix_to_the_field_key');
$fieldGroup->addField($field);
ACFHelper::enqueue($fieldGroup);

```

Classes &amp; Methods
---------------------

[](#classes--methods)

### Helper

[](#helper)

The `\Fryiee\ACF\Helper` package is the main entry point of the Helper package. This is where you will generate all your field groups and fields, as well as enqueue them.

#### Helper::createFieldGroup($title, $keySuffix = '', $args = \[\]);

[](#helpercreatefieldgrouptitle-keysuffix---args--)

This static method creates an instance of `\Fryiee\ACF\FieldGroup`. It takes the title of the Field Group as an argument, optionally a key suffix, and optionally additional arguments. By default, the helper class will set the field group's key to `group_slugified_title`, with the key suffix being added if it is not empty.

The `$args` argument takes any of the existing arguments for fields. See here:

*REMINDER: Changing your field group's title or key suffix will mean that existing data is no longer connected unless it is altered in the database.*

#### Helper::createField($type, $label, $args, $keySuffix = '')

[](#helpercreatefieldtype-label-args-keysuffix--)

This static method creates an instance of `\Fryiee\ACF\Field`. It takes the type of the field, the label, any additional arguments as an array, and optionally a key suffix. By default, the helper class will set the field's name to the slug of the label, and set the key to `field_slugified_label`, with the key suffix being added if it is not empty. This can be overrided by providing a `'name'` attribute in the $args array.

TBA List of field type slugs.

*REMINDER: Changing your field's label or key suffix will mean that existing data is no longer connected unless it is altered in the database.*

The `$args` argument takes any of the existing arguments for fields. See here:

TBA List of arguments for each field type.

#### Helper::enqueue($fieldGroup)

[](#helperenqueuefieldgroup)

This static method enqueues the field group using ACF's built in `register_field_group()` function for compatibility with both ACF and ACF PRO. It takes an instance of `\Fryiee\ACF\FieldGroup` as an argument.

### FieldGroup

[](#fieldgroup)

#### $fieldGroup-&gt;addLocation($param, $operator, $value)

[](#fieldgroup-addlocationparam-operator-value)

This method adds a location parameter to the field group.

TBA Add support for multiple locations

#### $fieldGroup-&gt;addField($field)

[](#fieldgroup-addfieldfield)

This method adds a field to the field group. It takes an instance of `\Fryiee\ACF\Field` as an argument.

#### $fieldGroup-&gt;generate()

[](#fieldgroup-generate)

TBA

### Field

[](#field)

#### $field-&gt;generate()

[](#field-generate)

TBA

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~108 days

Recently: every ~187 days

Total

8

Last Release

2528d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5254791?v=4)[Craig Berry](/maintainers/fryiee)[@fryiee](https://github.com/fryiee)

---

Top Contributors

[![fryiee](https://avatars.githubusercontent.com/u/5254791?v=4)](https://github.com/fryiee "fryiee (18 commits)")[![aaronlp](https://avatars.githubusercontent.com/u/9776187?v=4)](https://github.com/aaronlp "aaronlp (3 commits)")

---

Tags

wordpressacf

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fryiee-acf-helper/health.svg)

```
[![Health](https://phpackages.com/badges/fryiee-acf-helper/health.svg)](https://phpackages.com/packages/fryiee-acf-helper)
```

###  Alternatives

[samrap/acf-fluent

A fluent interface for the Advanced Custom Fields WordPress plugin

28357.1k4](/packages/samrap-acf-fluent)[devgeniem/acf-codifier

ACF Codifier

133222.8k30](/packages/devgeniem-acf-codifier)[folbert/fewbricks

Write code to create fields and more for Advanced Custom Fields

1196.0k](/packages/folbert-fewbricks)[log1x/modern-acf-options

A modern take on ACF Theme Options

3432.1k2](/packages/log1x-modern-acf-options)[iceicetimmy/acf-post-type-selector

Post type selector for Advanced Custom Fields.

559.0k](/packages/iceicetimmy-acf-post-type-selector)[bostondv/acf-ninja-forms

Adds an Advanced Custom Fields field to select one or many Ninja Forms.

1525.1k](/packages/bostondv-acf-ninja-forms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
