Recommended Free Tools
WordPress custom fields are post metadata: named key/value pairs attached to a post ID and stored in the wp_postmeta table. For a one-off value, you can enter a key and value in the editor’s Custom Fields panel. For a feature used across a custom post type, register the metadata in a plugin or theme, define its type and permissions, and set show_in_rest when an application must read or write it through the REST API.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
The right method depends on who edits the data and how reliably it must behave. Native fields are quick for occasional, simple values; registered metadata gives developers validation, capability checks, portability, and API support; a meta box or Advanced Custom Fields (ACF) gives editors a structured form for multiple or richer fields.
As an Amazon Associate I earn from qualifying purchases.
What a WordPress custom field is
WordPress calls post metadata “Custom Fields” in the Administration Screen. Each entry has a metadata key, such as subtitle, and a value, such as Director’s cut. The record is associated with a post ID in the wp_postmeta table. A post can have many keys, and a key can have one value or several values depending on how it is stored and retrieved.
Core provides three functions for the basic lifecycle:
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
add_post_meta()adds a key/value pair.update_post_meta()changes an existing value or creates it when appropriate.get_post_meta()retrieves a value.
WordPress serializes arrays and objects when it stores them. Scalar values are returned according to WordPress’s metadata rules, so your code should define the expected type rather than assuming every result is a string. Metadata is separate from the post title, content, excerpt, taxonomy terms, and featured image, which makes it useful for structured details that do not fit those standard fields.
Choose an implementation method
Decide whether the value is an occasional editorial note or a durable part of a feature. The following comparison keeps the trade-offs explicit.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →| Approach | Editor experience | Coding effort | Validation and sanitization | Repeatability | Theme portability | REST API exposure | Maintenance responsibility |
|---|---|---|---|---|---|---|---|
| Native Custom Fields panel | Direct key/value entry with little layout | Minimal | Mostly manual; no purpose-built form validation | Low for repeated editorial workflows | Data remains in WordPress metadata, but the editing interface is basic | Not automatically registered for API use | Administrator must keep keys and values consistent |
Core registration with register_meta() or register_post_meta() |
Uses a defined data contract; the editor UI may still need a separate control | Moderate | Explicit type, sanitization, authorization, and single/multiple-value rules | High across posts of a defined type | High when registration and display code live in a plugin | Available when show_in_rest is true |
Plugin or theme author owns the schema, permissions, and migrations |
| Custom meta box | Purpose-built controls inside the editor | Moderate to high | Form-specific validation and save handling | High when the box is attached to a post type | Depends on whether the box is packaged in a plugin or theme | Requires metadata registration or custom API callbacks | Developer maintains UI, saving, and compatibility |
| Advanced Custom Fields (ACF) | Field groups and richer field types for editors | Lower than building every control yourself | Field definitions and plugin rules support structured input; still review output and permissions | High for groups reused across posts, custom post types, users, and taxonomies | Field data can be used by templates, but portability depends on how the site stores and deploys the field definitions | ACF documents REST API integration; configure and test the fields you expose | Site team maintains field definitions and plugin compatibility |
Add a simple value with the native editor panel
Use the built-in panel when an administrator needs to add a small number of simple values to individual posts and does not need a polished form, repeated rows, or complex validation.
Block editor
- Open the post or page you want to edit.
- Open the editor options and preferences, then enable the Custom Fields panel if it is not already visible. The exact menu wording can vary by WordPress version and editor configuration.
- In the panel, choose an existing key or create a new one. Keep the key stable and descriptive, such as
subtitleorrelease_region. - Enter the value in the value control. Use one consistent format for every post that will use the key; for example, do not mix a date string with a human-written date description.
- Save or update the post, then reload it and verify that the value remains in the panel.
Classic editor
In the Classic Editor, the panel may be hidden under the screen options at the top of the edit screen. Enable Custom Fields there, add the key and value, and save the post. Sites can disable this panel through configuration, so a missing panel does not necessarily mean that metadata support is broken.
Keys to avoid
Do not start a key with an underscore when you expect it to appear in the standard Custom Fields list. WordPress treats underscore-prefixed keys as protected metadata and hides them from that list. Protected keys can still be used by code, but they are not a good choice for values that administrators must edit manually in the native panel.
Limits of the native panel
- There is little protection against spelling the same key in two different ways.
- Editors receive no purpose-built control for dates, URLs, relationships, repeaters, or other structured values.
- Validation and capability rules are not expressed by the simple key/value row.
- The method is awkward when every post in a custom post type must have the same fields.
Move to registered metadata or a custom form when the value becomes part of a repeatable feature rather than an occasional note.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Register metadata in a plugin or theme
A feature that depends on a predictable key should register it with register_meta() or register_post_meta(). Registration is the point where you describe the data model: its type, whether it is single-value, its description, REST visibility, sanitization, and authorization.
Register a field for one post type
register_post_meta() scopes the key to a particular post type. This is usually the clearest option for a custom post type. The following pattern registers a single string called subtitle for a post type named book:
register_post_meta(
'book',
'subtitle',
array(
'type' => 'string',
'single' => true,
'show_in_rest' => true,
)
);
This is a starting pattern, not a complete security policy. Match the type to the value you will actually store, decide whether multiple values are meaningful, and add sanitization and authorization callbacks appropriate to the feature. If the value is a URL, for example, validate and sanitize it as a URL rather than treating it as arbitrary text.
Register metadata across object types
Use register_meta() when the metadata is not limited to one post type or when you need the broader registration API. Registration should run at the appropriate WordPress initialization point in the plugin or theme so that the key is available whenever WordPress builds editor and REST responses.
Make a custom post type support custom fields
For a custom post type, enable custom-fields support when registering the type. Without that support, registered metadata may not appear or behave as expected in the editor.
register_post_type(
'book',
array(
'label' => 'Books',
'public' => true,
'supports' => array('title', 'editor', 'custom-fields'),
'show_in_rest' => true,
)
);
The post type’s REST availability and the metadata key’s show_in_rest setting solve different problems: the first exposes the post type endpoint, while the second exposes the registered key under the response’s meta object.
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Define type, cardinality, and permissions deliberately
- Type: Choose the value type that matches your data model, such as
string. A declared type helps REST clients and validation code reason about the value. - Single: Set
single => truewhen the key represents one value per post. Leave the model multi-valued only when several values are intentional. - Sanitization: Normalize and clean incoming values before saving. Sanitization should match the field’s purpose, not just remove characters indiscriminately.
- Authorization: Restrict writes to users who have the capability to edit the relevant post or feature. REST authentication does not replace capability checks.
- Description and naming: Use a stable, namespaced key when the field belongs to a plugin so it is less likely to collide with another feature.
Use a meta box or field plugin for editor-friendly forms
A custom meta box replaces an error-prone key/value row with controls designed for the data. A plugin or theme can render inputs, validate them, save them on the post-save lifecycle, and show helpful messages. This is the right direction when editors need a required value, a select list, a date control, repeatable rows, or several related fields that should appear together.
When a custom meta box is worth the code
- The same fields appear on every post in a custom post type.
- Editors need labels, instructions, defaults, or a constrained set of choices.
- Invalid values would break a template, feed, or application.
- The feature needs post-specific authorization or a custom save workflow.
Implement the form and storage as one feature: render the controls, verify the current user can edit the post, verify the request, sanitize each value for its data type, and save only the fields your code owns. Keep the key names and expected formats documented in the code so future template changes do not silently break old posts.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallWhen ACF is a practical alternative
Advanced Custom Fields is useful when an editor needs field groups and richer field types without the team building every control. Its documentation covers groups attached to posts, custom post types, users, and taxonomies, as well as REST API integration. Treat the field definitions as part of the site’s configuration: deploy them consistently between environments, review the generated values, and still escape values when outputting them.
Read and display a custom field in a template
Retrieve a value with get_post_meta(). Passing true as the fourth argument asks for a single value:
$subtitle = get_post_meta( $post_id, 'subtitle', true );
For the current post, you can use the current post ID supplied by the loop or template context. Always escape at the point of output, using the function appropriate to the destination:
$subtitle = get_post_meta( get_the_ID(), 'subtitle', true );
if ( $subtitle !== '' ) {
echo '<p class="book-subtitle">' . esc_html( $subtitle ) . '</p>';
}
- Use HTML-text escaping for a value printed as text.
- Use URL escaping when the value becomes a link destination.
- Use attribute escaping when placing it inside an HTML attribute.
Do not assume that a missing key produces useful markup. Decide what the empty state should be: omit an optional element, show a deliberate fallback, or treat the missing value as an editorial error. The template should also know whether the field is a scalar, an array, or an object, because WordPress serializes arrays and objects in storage.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesRank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Handling multiple values
If a key intentionally stores multiple values, retrieve them according to the metadata API’s single-versus-multiple behavior and iterate over the resulting array. Validate each item before output. Do not print a serialized representation directly into a page; it is storage format, not presentation format.
Expose custom fields through the WordPress REST API
Set show_in_rest to true in the metadata registration when a client must read or write the value. A registered field then appears under the response’s meta object. A client can send an update with a key/value pair inside meta, for example:
{
"meta": {
"url": "https://learn.wordpress.org"
}
}
The JSON shape is the important part; send it to the appropriate post update endpoint for your post type and post ID. The request still requires authentication, and the current user must pass the metadata and post capability checks. A public read response does not imply that anonymous users may write the field.
Use register_rest_field() for a top-level field
Use register_rest_field() when the client needs an arbitrary top-level response property with custom get and update callbacks and its own schema. Use register_meta() or register_post_meta() when the data is ordinary post metadata and should live under meta. Keeping ordinary metadata under meta makes the API contract easier for clients to understand.
Do not replace core response fields
The REST API handbook cautions that changing or removing core response fields can break plugins and WordPress behavior. Add a new field instead of altering a standard one. If a client needs only a subset of the response, use the global _fields parameter to request selected fields and reduce the response size.
Design a durable custom-field schema
Name keys for the feature, not the current screen
A key should describe the data, not where it happens to appear today. A name such as subtitle remains useful if the value later appears in a REST response, feed, or mobile client. Avoid changing a key merely because a label changed; renaming requires a migration or a compatibility read of both names.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Choose formats that every consumer can parse
Document whether a value is plain text, a URL, an identifier, a date string, or a list. Keep one format across all posts. If a field is a list, decide whether it is truly multi-valued metadata or one structured value, then register and retrieve it consistently.
Keep feature metadata in a plugin when it must survive theme changes
Templates belong to a theme, but a gameplay rating, release identifier, or other application data may need to survive a redesign. Put registration, validation, and migration logic in a plugin when the data is a site feature rather than a presentation detail. A theme can still read the field, but the schema does not disappear when the theme changes.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Test the entire lifecycle
- Create a post of the target type and save a valid value.
- Reload the editor and confirm the value is still present.
- Try an empty, malformed, or unauthorized value and verify that the save path handles it safely.
- Render the post in every template that uses the field and check the empty state.
- Request the REST representation and confirm the value appears under
metaonly when intended. - Send an authenticated update and verify that capability checks, sanitization, and type conversion behave as designed.
Troubleshoot common failures
The Custom Fields panel is missing
First check the editor’s preferences or screen options and enable the panel. If the key begins with an underscore, WordPress will treat it as protected and hide it from the standard list. For a custom post type, verify that custom-fields is included in its supported features. A plugin or theme can also provide a different editor interface, so inspect the active configuration before creating duplicate keys.
The value saves under the wrong key
Compare the key character by character, including capitalization, underscores, and spelling. Native fields do not enforce a shared schema, so a typo creates a different metadata record. Once a feature is registered, use the registered key in the form, save callback, template, and API client.
The value is not visible in REST responses
Confirm that the metadata is registered, that show_in_rest is true, and that the post type itself is available through the REST API. Check that the response is for the expected post type and that the field is not being hidden by a response selection such as _fields. A field registered only in a template will not automatically become API metadata.
A REST update is rejected
Check authentication first, then the current user’s capability to edit the post and the metadata. Review the registered type and sanitization callback; a value that does not match the schema may be rejected or normalized. Do not solve a permission problem by making the field publicly writable.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The template prints nothing or prints broken markup
Verify the post ID, key name, and whether the field is single-value or multi-valued. Inspect the actual returned type before iterating or concatenating it. Add an explicit empty-state branch, then escape the value for its output context. If an array or object was stored, decode it through the metadata API rather than printing the serialized storage form.
Worked pattern: a game review subtitle
Imagine a custom post type named game with an optional subtitle that editors and a headless client both need. The durable implementation has four parts:
- Register the
gamepost type with REST support andcustom-fieldssupport. - Register
subtitlefor that post type as a single string and setshow_in_restto true. - Provide a controlled editor input through a meta box or field group if editors need guidance; use the native panel only for occasional manual values.
- Read the value with
get_post_meta( $post_id, 'subtitle', true ), escape it as HTML text, and omit the subtitle element when it is empty.
The same schema then serves the classic site and API clients without forcing either consumer to infer a value from post content.
Quick Recap
A practical decision checklist
- Is this a one-off value on a few posts? Use the native Custom Fields panel.
- Is the key part of a plugin or theme feature? Register it with
register_meta()orregister_post_meta(). - Does it belong to one custom post type? Scope it with
register_post_meta()and enablecustom-fieldssupport. - Do editors need repeaters, select controls, instructions, or validation? Use a custom meta box or ACF.
- Must an application read or write it? Set
show_in_restto true and enforce authentication and capabilities. - Does the API need a custom top-level property rather than ordinary metadata? Use
register_rest_field(). - Will the value appear in HTML? Escape it for the exact output context and define the missing-value behavior.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Free tools Windows power users keep installed
One-click scans. No signup required.




