Complete Technical Reference • v1.0.5

MetaForge Engine Documentation

Everything you need to configure and deploy MetaForge Pro: license activation, multi-LLM AI setup, zero lock-in fallback stubs, updates, and theme PHP snippets.

1. Quick Start & Plugin Installation

Congratulations on choosing MetaForge Engine! Installing the plugin on your WordPress site takes less than 2 minutes.

System Requirements

WordPress Version
6.0 or higher
✓ Tested through WP 6.7+
PHP Runtime
7.4, 8.0, 8.1, 8.2, 8.3
✓ Strict typing compliant
Database Engine
MySQL 5.7+ / MariaDB 10.3+
✓ Uses standard wp_postmeta

Step-by-Step Installation

  1. Download the Plugin Package: After completing checkout, click "Download MetaForge Pro (.zip)" in your Account Portal or save the archive from your confirmation email.
  2. Upload to WordPress: Log in to your WordPress Dashboard (your-site.com/wp-admin), then navigate to Plugins → Add New → Upload Plugin.
  3. Select File & Install: Click Choose File, select metaforge-pro.zip, and click Install Now.
  4. Activate Plugin: Once uploaded, click Activate Plugin. You will immediately see the dedicated MetaForge menu in your admin sidebar.
Pro Tip: Keep your license key ready for step 2 to unlock advanced repeater fields, Gutenberg block exports, and background version updates.

2. License Key Activation Guide

Your MetaForge Pro license key grants you access to advanced field structures, multi-LLM AI generator prompts, and automated background update distribution.

Activating Your License Key

  1. Open MetaForge Settings: In your WP Admin sidebar, navigate to MetaForge → AI Settings (or License & Updates).
  2. Locate MetaForge Pro License Card: Look at the top card titled MetaForge Pro License & Automatic Updates.
  3. Paste License Key: Paste your license key (formatted like METAFORGE-PRO-XXXX-XXXX-XXXX) into the License Key input box.
  4. Save & Activate: Click Save Settings. The status indicator will turn green to confirm active domain binding.
Security Architecture: Your MetaForge Pro License Key is completely decoupled from your AI Provider API Keys. Your license key handles plugin entitlement and security updates, while your AI keys query LLM endpoints directly without middleman logging.

3. AI Provider API Configuration

MetaForge supports 6 major AI LLM providers so you can select the model that fits your workflow and budget (including 100% free options).

Supported AI Providers (6 Engines)

ProviderModel RecommendationPricing ModelAPI Key Signup
Google GeminiGemini 2.0 Flash Lite / Gemini 1.5 ProGenerous Free Tieraistudio.google.com
Groq AILlama 3.3 70B Versatile100% Free Tierconsole.groq.com
DeepSeekDeepSeek R1 / DeepSeek V3Ultra-low costplatform.deepseek.com
OpenRouterMulti-Model Unified GatewayFlexible pay-per-creditopenrouter.ai
OpenAIGPT-4o Mini / GPT-4oPay-as-you-goplatform.openai.com
AnthropicClaude 3.5 SonnetPay-as-you-goconsole.anthropic.com

How to Configure Your API Key

  1. Go to MetaForge → AI Settings in your WordPress dashboard.
  2. In the AI Provider API Configuration card, enter your key in the Provider API Key field.
  3. Select your preferred model from the dropdown (e.g. Gemini 2.0 Flash Lite or Llama 3.3 70B).
  4. Click Test Connection to confirm your key is active.
  5. Click Save Settings.

4. Guaranteed Zero Lock-In & MU-Plugin Stub

MetaForge Engine provides full enterprise data ownership and site uptime protection. Your content is never trapped inside proprietary tables.

How Uptime Protection Works

Upon activation, MetaForge Engine deploys a lightweight Must-Use fallback stub to wp-content/mu-plugins/metaforge-stub.php. If the main MetaForge Engine plugin is ever deactivated or uninstalled:

  • The MU-plugin stub intercepts helper functions like metaforge_get_field(), metaforge_the_field(), metaforge_get_repeater(), and metaforge_get_sub_field().
  • Calls to wp_postmeta, wp_termmeta, and wp_options continue retrieving stored database values directly.
  • Raw attachment IDs stored in image fields are recursively formatted into full array structures (ID, url, title, alt, filename), preventing broken front-end template output.
100% Site Uptime: You can safely test or deactivate MetaForge Engine at any time without experiencing white screens or PHP fatal errors on your live site templates.

5. Plugin Updates (Automatic vs. Manual)

MetaForge Engine provides flexible options for keeping your WordPress sites updated securely.

Method A: Automatic Background Updates (Recommended)

When you enter a valid MetaForge License Key in settings, WordPress automatically hooks into our release pipeline.

  • Whenever a new stable release is published, a notification will appear under WP Admin → Plugins or Dashboard → Updates.
  • Simply click Update Now to upgrade seamlessly without losing any field group settings or post data.

Method B: Manual ZIP Upload Updates

If you manage client sites manually or restrict outward connections:

  1. Download the updated metaforge-pro.zip package from your customer account portal.
  2. Go to WP Admin → Plugins → Add New → Upload Plugin.
  3. Upload the new .zip file and click Replace current with uploaded.
  4. All existing custom post types, taxonomies, and meta fields remain completely intact.

6. CPT, Taxonomy & 28 Field Types Builder

MetaForge allows you to build custom field layouts visually using drag-and-drop meta boxes or by typing natural language prompts into the AI Layout Assistant.

28 Native Field Types Supported

MetaForge provides 28 polymorphic field types split into 20 Free Core Fields and 8 Pro Advanced Fields:

20 Free Core Fields

  • Basic: Text, Textarea, Number, Range / Slider, Checkbox, Radio Button, True/False Switch, Link / CTA Picker, Button, Color Picker, DateTime Picker
  • Media: Image (Single/Array), File Attachment, WYSIWYG TinyMCE
  • Relational: Select Dropdown, Post Type Selector, Taxonomy Selector, User Selector
  • Structural: Group Field Wrapper, Tab UI Divider

8 Pro Advanced Fields

  • Repeater Engine: Nested sub-fields with infinite drag-and-drop rows
  • Flexible Content: Modular page section layout builder
  • Multi-Image Gallery: Sortable photo galleries with bulk uploader
  • Relationship Builder: Bi-directional multi-post connections
  • oEmbed Media: Live responsive YouTube / Vimeo / Spotify embeds
  • Icon Picker: 1,000+ FontAwesome 6.5 & Dashicons library
  • Code Editor: CodeMirror syntax highlighter (HTML/CSS/JS/PHP)
  • Accordion UI: Collapsible admin meta box panels

Using the AI Assistant

In the MetaForge Field Group editor, open the AI Assistant Panel and type what you need. Example prompts:

  • "Build a Real Estate property listing with price, address, bedroom select, image gallery, and agent details."
  • "Create an Event post type with start date, location map, speaker repeaters, and registration ticket link."

The AI assistant constructs field keys, types, and location rules automatically in real-time.

7. Theme Integration & Repeater Loop API

Displaying custom fields in your WordPress theme templates (single.php, archive.php, or page templates) is simple using native MetaForge helper functions.

Standard Field Extraction

single-property.php
<?php
// Get current post ID
$post_id = get_the_ID();

// Fetch field values using metaforge_get_field()
$price    = metaforge_get_field('property_price', $post_id);
$address  = metaforge_get_field('property_address', $post_id);
$hero_img = metaforge_get_field('hero_image', $post_id);

if ($price) : ?>
  <div class="property-meta">
    <img src="<?php echo esc_url($hero_img['url']); ?>" alt="<?php echo esc_attr($hero_img['alt']); ?>" />
    <span class="price"><?php echo esc_html($price); ?></span>
    <p class="address"><?php echo esc_html($address); ?></p>
  </div>
<?php endif; ?>

ACF-Compatible Repeater Loop API

Repeater Loop Extraction
<?php
// Loop over nested repeater rows
if (metaforge_have_rows('gallery_items')) :
  while (metaforge_have_rows('gallery_items')) : metaforge_the_row();
    $caption = metaforge_get_sub_field('caption');
    $photo   = metaforge_get_sub_field('photo');
    ?>
    <div class="gallery-slide">
      <img src="<?php echo esc_url($photo['url']); ?>" alt="<?php echo esc_attr($caption); ?>" />
      <span><?php echo esc_html($caption); ?></span>
    </div>
    <?php
  endwhile;
endif;
?>

8. Developer Tools: WP-CLI & Writable REST API

MetaForge includes command line and REST API tooling for CI/CD deployment pipelines.

WP-CLI Local JSON Sync Command

Terminal Command (WP-CLI)
# Synchronize local JSON field group schemas across environments
wp metaforge sync --dir=theme/metaforge-json

Headless REST API Endpoint

Access registered field schema configurations programmatically:

REST API Schema Call
GET https://your-domain.com/wp-json/metaforge/v1/fields?post_id=1032

9. Troubleshooting & Frequently Asked Questions

Issue: "API Key / License Key Invalid" Notice

Ensure there are no extra trailing spaces when copying your license key. If testing an AI key, verify that your quota with Gemini or Groq is active and not rate-limited.

Issue: "Fields not showing up in post editor"

Check the Location Rules inside your Field Group. Ensure rule conditions (e.g. Post Type is equal to Property) match the active post type you are editing.

Need Support? Developer Pro and Agency tier customers receive priority assistance. Submit an inquiry directly via your customer account portal or email our engineering team at support@metaforgeengine.com.

10. 1-Click Gutenberg Block Builder

MetaForge Pro enables you to convert any custom field group into a native, dynamic WordPress Gutenberg Block with a single click—no React, JSX, or complex Webpack builds required.

How to Turn a Field Group into a Block

  1. Open any Field Group in MetaForge → Field Groups.
  2. In the right sidebar panel, look for the Gutenberg Block Settings (Pro) metabox.
  3. Check the box labeled "Enable as Gutenberg Block".
  4. Choose a Block Category (Widgets, Layout, Design, Text, Media, or Theme).
  5. Assign a WordPress Dashicon name (e.g. layout, star-filled, grid-view).
  6. Add an optional description and search keywords for your content editors, then click Update / Publish.

Using Your Custom Block in the Block Editor

Open any Post, Page, or Full Site Editing (FSE) template. Click the + Block Inserter and search for your field group title. The block will appear with its custom icon and allow editors to populate all fields visually in the block sidebar.

Front-End Rendering: MetaForge Pro automatically generates a responsive, accessible CSS grid wrapper for front-end rendering. You can also customize the output template via the metaforge_gutenberg_block_groups filter.

11. Advanced Pro Field Types Reference

MetaForge Pro unlocks 8 enterprise field types: Repeater, Flexible Content, Gallery, Relationship, oEmbed, Icon Picker, Code Editor, and Accordion.

A. Repeater Field

Loop through repeating sets of subfields (e.g. Team Members, Pricing Tables, FAQs):

Repeater Field PHP Loop
<?php
$team_members = get_post_meta(get_the_ID(), 'team_members', true);

if (!empty($team_members) && is_array($team_members)) : ?>
  <div class="team-grid">
    <?php foreach ($team_members as $member) : ?>
      <div class="team-card">
        <h4><?php echo esc_html($member['full_name']); ?></h4>
        <span><?php echo esc_html($member['job_title']); ?></span>
      </div>
    <?php endforeach; ?>
  </div>
<?php endif; ?>

B. Flexible Content Layout

Render dynamic, modular page sections assembled by content editors:

Flexible Content Router
<?php
if (metaforge_have_rows('page_sections')) :
  while (metaforge_have_rows('page_sections')) : metaforge_the_row();
    $layout = metaforge_get_row_layout();
    if ($layout === 'hero_banner') :
      get_template_part('template-parts/hero');
    elseif ($layout === 'features_grid') :
      get_template_part('template-parts/features');
    elseif ($layout === 'cta_block') :
      get_template_part('template-parts/cta');
    endif;
  endwhile;
endif;
?>

C. Gallery Field

Output curated photo galleries with attachment IDs or URLs:

Multi-Image Gallery Output
<?php
$gallery_images = get_post_meta(get_the_ID(), 'project_gallery', true);

if (!empty($gallery_images)) : ?>
  <div class="gallery-slider">
    <?php foreach ((array)$gallery_images as $img_id) : ?>
      <?php echo wp_get_attachment_image($img_id, 'large', false, ['class' => 'gallery-img']); ?>
    <?php endforeach; ?>
  </div>
<?php endif; ?>

D. Relationship Field

Link and query bidirectional post relationships (e.g. Related Case Studies, Instructors):

Relationship Posts Query
<?php
$related_posts = get_post_meta(get_the_ID(), 'related_case_studies', true);

if (!empty($related_posts)) : ?>
  <ul class="related-list">
    <?php foreach ((array)$related_posts as $post_id) : ?>
      <li><a href="<?php echo esc_url(get_permalink($post_id)); ?>"><?php echo esc_html(get_the_title($post_id)); ?></a></li>
    <?php endforeach; ?>
  </ul>
<?php endif; ?>

E. oEmbed Media Field

Embed responsive third-party media from YouTube, Vimeo, Spotify, or Soundcloud with live preview:

oEmbed Media Renderer
<?php
$video_embed = metaforge_get_field('video_embed', get_the_ID());
if ($video_embed) : ?>
  <div class="responsive-video-container">
    <?php echo $video_embed; ?>
  </div>
<?php endif; ?>

F. Icon Picker Field

Select from over 1,000+ FontAwesome 6.5 Pro and WordPress Dashicon symbols:

Icon Picker Display
<?php
$feature_icon = metaforge_get_field('feature_icon', get_the_ID(), 'fa-solid fa-bolt');
if ($feature_icon) : ?>
  <i class="<?php echo esc_attr($feature_icon); ?>" aria-hidden="true"></i>
<?php endif; ?>

G. Code Editor Field

Embedded CodeMirror editor supporting HTML, CSS, JavaScript, JSON, and PHP syntax:

Custom Code Injection
<?php
$custom_css = metaforge_get_field('page_custom_css');
if (!empty($custom_css)) :
  echo '<style id="metaforge-page-styles">' . wp_strip_all_tags($custom_css) . '</style>';
endif;
?>

H. Accordion UI Divider

Visual UI layout divider that creates collapsible panels in the WordPress post editor to cleanly organize long forms:

Accordion Subfields Retrieval
<?php
// Accordions organize the WP Admin editing screen into collapsible panels.
// Sub-fields below an Accordion divider are retrieved normally via metaforge_get_field():
$seo_keywords = metaforge_get_field('seo_meta_keywords');
$og_image     = metaforge_get_field('og_social_image');
?>

12. Front-End Form Builder

MetaForge Pro includes a lightweight, secure front-end submission engine. Embed any field group onto client-facing pages using the [metaforge_form] shortcode.

Basic Shortcode Usage

Shortcode Usage
[metaforge_form group_id="42" post_type="property" submit_text="Publish Listing"]

Shortcode Parameters Reference

AttributeDefaultDescription
group_id0The WordPress Post ID of the Field Group containing fields to display.
post_typepostTarget post type to create (e.g. property, event, review).
post_statuspublishCreated entry status (publish, draft, or pending for editorial review).
submit_textSubmit EntryCustom call-to-action text on the form submit button.
allow_guest1Set to 0 to require visitors to log in before submitting.
redirect_url(current page)Optional URL to redirect users to after successful submission.

13. Agency White-Labeling & Client Access Control

Deliver bespoke, professional WordPress sites to your clients without exposing third-party vendor names or Pro license keys.

White-Label Configuration

  1. In wp-admin, navigate to MetaForge → White Label.
  2. Custom Plugin Name: Enter your agency's product name (e.g. Acme Studio Architect). This dynamically renames all admin headers and menu titles.
  3. Custom Logo URL: Provide your agency icon (SVG/PNG) to replace the default MetaForge brand mark.
  4. Agency Website: Set your custom support documentation link.
  5. Hide Pro Badges: Conceal all neon "PRO" indicators across the WordPress dashboard.
  6. Restrict Admin Menu: Automatically hide the MetaForge schema builder from non-administrators (clients).
  7. Hide License Submenu: Keep your license key private—only network Super-Admins will see the license activation page.