Getting Started — Pure Metafields Documentation

Docs/Getting Started

Getting Started

Install the plugin, activate it, and create your first custom field in a few minutes.

01 · Setup

Requirements

RequirementVersion
WordPress5.6 or later (tested up to 6.9)
PHP8.0 or later

02 · Setup

Installation

Three ways to install, depending on how your server is set up.

From the WordPress dashboard

  1. Open Plugins

    Log in to your admin panel and go to Plugins → Add New.

  2. Search & install

    Search for Pure Metafields, click Install, then Activate.

Manual upload (no internet on the server)

  1. Download the ZIP

    Get the plugin ZIP file from your source.

  2. Upload it

    Go to Plugins → Add New → Upload Plugin, choose the ZIP, and click Install Now.

Via FTP

  1. Unzip locally

    Download and unzip the plugin ZIP on your computer.

  2. Upload the folder

    Using FileZilla, Cyberduck, or SSH, upload the folder to wp-content/plugins/.

03 · Setup

Activation

Go to Plugins → Installed Plugins, find Pure Metafields, and click Activate. A new top-level admin menu, Pure Fields, appears in the sidebar — that's the plugin's home for every builder and tool.

04 · Your first field

Your first meta field

The fastest way to see the plugin work is a few lines of PHP in your theme's functions.php. (The Meta Builder does the same thing with no code, if you'd rather start there.)

PHP · functions.php
add_filter( 'tp_meta_boxes', function( $boxes ) {
    $boxes[] = [
        'metabox_id' => 'page_hero',
        'title'      => 'Page Hero',
        'post_type'  => [ 'page' ],
        'fields'     => [
            [ 'id' => 'hero_title', 'type' => 'text', 'label' => 'Title' ],
        ],
    ];
    return $boxes;
} );

Save the file, open any Page to edit it, and a new Page Hero box appears under the content editor with your Title field inside. Type something and click Update.

Read it back on the front end with tpmeta_field():

PHP · page template
$title = tpmeta_field( 'hero_title' );
if ( $title ) {
    echo esc_html( $title );
}
What just happened

The field saved as post_meta on that page, keyed by its id (hero_title). That's one of the two storage rules covered next — see Basic concepts. For every available field type and the full registration API, continue to the Developer Guide.

05 · Before you go further

Basic concepts

Two rules cover almost every question you'll have.

Options are theme_mods, metaboxes are post_meta

An Option Builder panel field (theme-wide settings) saves as a theme_mod — read it with tpmeta_get_option() or get_theme_mod(). A metabox field (per-post, like the one above) saves as post_meta — read it with tpmeta_field(). Using the wrong helper is the single most common source of "my value comes back empty."

The field ID is the storage key

Whatever you set as a field's id becomes the literal key you read back. Keep IDs short, lowercase, and stable (header_logo, not Header Logo) — they travel with export/import and are what your templates call forever after.

More detail

The full model is explained in Introduction → How the plugin works.