Skip to content

WP Freeform FieldsFree custom fields for WordPress

Field groups, repeaters, flexible content, options pages and PHP blocks. Compatible with ACF data and template functions. No Pro version — everything is GPL.

WP Freeform Fields

Quick start ​

Register a field group in your theme or plugin:

php
add_action( 'wpff/init', function () {
	wpff_add_local_field_group( array(
		'key'      => 'group_book',
		'title'    => 'Book',
		'fields'   => array(
			array( 'key' => 'field_book_isbn', 'name' => 'isbn', 'label' => 'ISBN', 'type' => 'text', 'required' => 1 ),
			array( 'key' => 'field_book_cover', 'name' => 'cover', 'label' => 'Cover', 'type' => 'image', 'return_format' => 'url' ),
		),
		'location' => array( array( array( 'param' => 'post_type', 'operator' => '==', 'value' => 'post' ) ) ),
	) );
} );

Then read the values in a template, exactly as with ACF:

php
echo esc_html( get_field( 'isbn' ) );
printf( '<img src="%s" alt="">', esc_url( get_field( 'cover' ) ) );

Requires WordPress 6.5+ and PHP 8.1+. Read the guide →

Not affiliated with ACF or WP Engine

WP Freeform Fields is an independent project, written from scratch, with no ACF code. "Advanced Custom Fields", "ACF" and "ACF PRO" are trademarks of WP Engine, used here only to describe compatibility.

GPL-2.0-or-later. Not affiliated with ACF or WP Engine.