Field reference

Document field groups

Attach registered fields to posts, pages, products, or your own REST-enabled post types.

#Register a group

Paste this complete example into the registration file loaded by your theme.

PHP
<?php

defined('ABSPATH') || exit;

use Voxyframe\Core\Registry;

add_action('voxycure/register', function (Registry $registry): void {
    $registry->register_field_group('page-details', [
        'name' => 'Page details',
        'post_types' => ['page'],
        'fields' => [
            ['field_key' => 'kicker', 'label' => 'Kicker', 'type' => 'text'],
            ['field_key' => 'featured', 'label' => 'Featured', 'type' => 'toggle'],
        ],
    ]);
});

#Persistence and permissions

Voxycure registers each key with register_post_meta(), adds custom-fields support when needed, and authorizes writes with current_user_can("edit_post", $post_id). Complex types receive explicit REST schemas.

#Read a field

PHP
$value = voxycure_get_field('kicker');
$otherPostValue = voxycure_get_field('kicker', 42, 'Fallback');
Framework version2.0.0
PHP requirement8.0+
Documentation updatedAugust 2026