Custom Field Groups
Create custom fields for your posts, pages, and custom post types using a visual builder. No coding required — just define your fields and they appear in the post editor.
Use Cases
- Add product specifications (dimensions, weight, material) to WooCommerce products
- Create recipe fields (ingredients, cook time, servings) for food blogs
- Build real estate listing data (bedrooms, bathrooms, square footage)
- Store team member info (job title, social links, bio) for staff pages
How It Works
- Navigate to Switchboard → Custom Field Groups
- Create a new field group
- Add fields (text, textarea, select, etc.)
- Assign the group to specific post types
- Fields appear in the post editor when editing those post types
Where to Find It
Location: Switchboard → Custom Field Groups in your WordPress admin menu.
Creating a Field Group
Step 1: Name Your Group
Give your field group a descriptive name like “Product Details” or “Recipe Information”. This name appears as the metabox title in the post editor.
Step 2: Add Fields
Click “Add Field” and configure:
| Setting | Description |
|---|---|
| Field Label | Human-readable name shown in editor |
| Field Key | Unique identifier for storing data (auto-generated) |
| Field Type | Type of input (text, textarea, select, etc.) |
| Placeholder | Helper text shown in empty fields |
| Required | Whether the field must be filled |
Step 3: Assign to Post Types
Select which post types should display this field group. Options include:
- Posts
- Pages
- Custom post types (Products, Team Members, etc.)
Available Field Types
| Type | Description | Best For |
|---|---|---|
| Text | Single line input | Names, titles, short values |
| Textarea | Multi-line input | Descriptions, summaries |
| Number | Numeric input | Prices, quantities, measurements |
| Email address input | Contact information | |
| URL | Website address input | Links, social profiles |
| Date | Date picker | Events, deadlines |
| Select | Dropdown menu | Predefined choices |
| Checkbox | Yes/No toggle | Boolean options |
| Image | Media library picker | Photos, icons |
Example: Recipe Fields
Create a “Recipe Details” field group:
| Field Label | Type | Options |
|---|---|---|
| Prep Time | Text | Placeholder: “15 minutes” |
| Cook Time | Text | Placeholder: “30 minutes” |
| Servings | Number | — |
| Difficulty | Select | Easy, Medium, Hard |
| Ingredients | Textarea | Required: Yes |
| Instructions | Textarea | Required: Yes |
| Vegetarian | Checkbox | — |
| Recipe Photo | Image | — |
Displaying Custom Fields
In Theme Templates
<?php
// Get a single field value
$prep_time = get_post_meta(get_the_ID(), 'prep_time', true);
echo '<p>Prep Time: ' . esc_html($prep_time) . '</p>';
// Get checkbox value
$is_vegetarian = get_post_meta(get_the_ID(), 'vegetarian', true);
if ($is_vegetarian === 'yes') {
echo '<span class="badge">Vegetarian</span>';
}
// Get image
$image_id = get_post_meta(get_the_ID(), 'recipe_photo', true);
if ($image_id) {
echo wp_get_attachment_image($image_id, 'medium');
}
?>
In Page Builders
Most page builders can display custom fields:
- Elementor: Dynamic Tags → Post Meta
- Beaver Builder: Field Connections
- Gutenberg: Use the Post Meta block or dynamic blocks
Field Group Management
Editing Groups
- Go to Switchboard → Custom Field Groups
- Click on a group to edit
- Add, remove, or modify fields
- Save changes
Deleting Groups
Deleting a field group removes the editor interface but doesn’t delete the data stored in posts. Data remains accessible and will reappear if you recreate the group with the same field keys.
FAQ
Where is the field data stored?
Field data is stored as post meta in the WordPress database. Each field key becomes a meta key, making data accessible viaget_post_meta().Can I use the same field group for multiple post types?
Yes! When creating a field group, select all the post types where you want it to appear.Will my data be lost if I delete a field group?
No. The data stays in your database. Only the editor interface is removed. Recreate the group with the same field keys to access it again.Can I create repeater or flexible content fields?
This module provides standard field types. For complex repeater fields, consider using ACF (Advanced Custom Fields) alongside Switchboard.How do I display fields on the frontend?
Useget_post_meta($post_id, 'field_key', true) in your theme templates, or use your page builder’s dynamic field features.Use consistent, descriptive field keys like “recipe_prep_time” rather than generic names like “field1”. This makes your data easier to work with in templates.
This module provides core custom field functionality. For advanced features like conditional logic, repeaters, or flexible content layouts, consider complementing with ACF.
Get access to all 147 modules with a single license