Custom Fields

Advanced Custom Fields

We’re big fans of the Advanced Custom Fields plugin by Elliot Condon. Advanced Custom Fields is the perfect solution for any WordPress website which needs more flexible data like other content management systems.

If you’re like us and prefer to write your fields in PHP you should checkout out our ACF package. It provides a simple API to create your custom fields in PHP. Visit the documentation to read more about the package.

Below is an example of adding custom fields with the advanced custom fields package.

$fields = [
    acf_image(['name' => 'image', 'label' => 'Image']),
    acf_text(['name' => 'title', 'label' => 'Title']),
];

$location = [
    [
        acf_location('post_type', 'page')
    ],
];

acf_field_group([
    'title' => 'About',
    'fields' => $fields,
    'style' => 'seamless',
    'location' => $location,
]);