
內容簡介
Fieldstone 是一款內容建模外掛,讓使用者能夠透過直觀的視覺編輯器建立欄位群組、自訂文章類型及分類法。其核心價值在於將資料存儲於專用的資料庫表中,提供更快的查詢速度及更高的效率。
【主要功能】
• 視覺欄位群組編輯器,支援 15 種欄位類型
• 自訂表格存儲,每篇文章一行索引
• Postmeta 鏡像,確保與其他外掛兼容
• 位置規則,根據文章類型或狀態設定欄位群組
• 條件邏輯,根據其他欄位值顯示或隱藏欄位
• 從 Advanced Custom Fields 匯入現有欄位群組
外掛標籤
開發者團隊
原文外掛簡介
Fieldstone is a content-modeling plugin for WordPress: build field groups, custom post types, and taxonomies from a clean visual editor, then read the values in your theme with simple template functions.
What makes Fieldstone different is where your data lives. Field values are stored in dedicated, indexed database tables — one row per post — instead of scattering two rows per field across wp_postmeta. That means faster queries, no postmeta bloat, and content you can actually query by field value.
At the same time, a postmeta mirror (on by default) keeps a plain copy of every value where the rest of the ecosystem expects it, so exports, backups, SEO plugins, and search plugins keep working untouched.
Features
Visual field group editor — 15 field types: text, textarea, number, email, URL, select, checkbox, radio, true/false, image, file, WYSIWYG, date, color, and post link.
Custom table storage — one indexed row per post; opt any field into a real database index.
Postmeta mirror — full compatibility with WordPress export/import, backup plugins, SEO variables, and search plugins. A rebuild tool covers both directions.
Location rules — target field groups by post type, page template, specific post/page, page type (front page, child pages…), or post status, combined with and/or logic.
Conditional logic — show or hide fields based on other fields’ values, enforced server-side.
Validation — mark any field required, and set length, range, pattern or format rules with your own error message. Checked in the browser before saving and re-checked on the server, where an invalid field is reported without overwriting the value you already had.
Import from Advanced Custom Fields — bring your existing ACF field groups across in one click, with a plain-English warning for anything that can’t map one to one. Deterministic mapping, no AI involved, and your ACF data is left untouched.
Custom post types & taxonomies — register them from the same editor, with labels generated for you.
Local JSON — every definition (field groups, post types, taxonomies) syncs to files in your theme for version control and deployments.
REST API — opt field groups into the REST API; values appear on post responses and are writable with proper permissions.
WP-CLI — wp fstn json status|sync, wp fstn mirror rebuild, wp fstn table status.
Developer API — fstn_get_field(), fstn_the_field() (escaped by default), fstn_update_field(), fstn_register_field_group(), and a stable extension contract for custom field types.
Generate with AI (optional) — describe a field group in plain language (“a recipe with ingredients, prep time and a photo”) and get the whole group drafted for review: correct types, choices, validation rules, and a location rule. Or open a group you have already started and ask for the fields it is missing — suggestions are added for review and never rename or replace what you built. Bring-your-own Anthropic API key; completely off until you add one. See “External services” below.
How to use
Go to Fieldstone → New Field Group, add your fields, and set a location rule (e.g. Post Type is Page).
Edit a matching post — your fields appear in a metabox. Fill them in and update.
Display the values in your theme with the template functions below.
Template functions
fstn_get_field( $name, $context, $format ) — returns a field value (formatted by default). You escape the output.
fstn_the_field( $name, $context ) — echoes the value already escaped with esc_html(). Best for plain text.
fstn_get_fields( $context ) — returns all values for an object as a name => value array.
fstn_update_field( $name, $value, $context ) — sanitizes and stores a value.
fstn_delete_field( $name, $context ) — deletes a value.
$context defaults to the current post in The Loop. It also accepts a post ID (123), 'option' for site-wide values, 'user_5' for a user, 'term_12' for a term, or a WP_Post / WP_User / WP_Term object.
Displaying each field type
Text / Textarea / Email — returns a string ('' when empty).
URL — returns an escaped URL string.
Visit
Number — returns an int (or float when decimals are enabled), null when empty.
$
True / False — returns a bool.
Featured
Select / Radio — returns the chosen value as a string. A select with “Allow multiple” returns an array of strings.
Checkbox — returns an array of the checked values.
Image — return format is a per-field setting: array (default) returns id, url and alt; url returns the URL string; id returns the attachment ID.
With return format id, use core helpers for responsive images: echo wp_get_attachment_image( fstn_get_field( 'headshot' ), 'large' );
File — same formats as image; the default array carries id, url and filename.
WYSIWYG — returns formatted HTML. Print with wp_kses_post().
Date — returns a string in the field’s return format (default Y-m-d), null when empty.
Color — returns a hex string: #rrggbb, or #rrggbbaa when opacity is below 100%.
Post Link (relationship) — returns a WP_Post object by default, or the post ID with return format id.
Reading many fields at once
Options, users and terms
External services
Fieldstone can optionally connect to the Anthropic API (api.anthropic.com) to power its two AI features: “Generate with AI” and “Suggest fields”.
What is sent, and when: for Generate, only the field-group description you type into the Generate panel. For Suggest fields, only the title of the group you are editing and the label, name and type of the fields already in it. Both also send the plugin’s field-type instructions. A request is made only when you have saved your own Anthropic API key in Fieldstone → Settings AND click the Generate or Suggest fields button. No site content, posts, field values, user data, or analytics are ever sent, and nothing is sent in the background.
Who provides it: the request goes directly from your server to Anthropic, PBC using your own API key — never through any Fieldstone server. Usage is billed by Anthropic to your account (typically a few cents per generation).
Anthropic terms of service and privacy policy.
Without an API key, no AI features are shown and the plugin makes no external requests at all.
