| 开发者 | farukahmed |
|---|---|
| 更新时间 | 2026年7月12日 21:05 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
$value = onemeta_get_meta( get_the_ID(), 'field_key' );
$value = onemeta_get_user_meta( $user_id, 'field_key' );
🔀 Conditional Logic
Show or hide fields dynamically based on the value of other fields, combining multiple rules with AND/OR. Supports ==, !=, contains, and !contains operators.
📤 Export as PHP
Export any field group as clean PHP code to bundle with your theme or plugin — no dependency on OneMeta required.
🔗 Links
onemeta folder to /wp-content/plugins//src directory contains all uncompiled source files. To build from source: npm install then npm run build.Yes, OneMeta is 100% free and open-source, licensed under GPL-2.0-or-later.
OneMeta covers the most commonly used features of ACF — 14 field types, repeaters, conditional logic, and REST API support — all for free. It is designed to be lightweight and modern.
Yes! Use the Export PHP feature to export your field group as PHP code. You can then register fields directly from your theme or plugin without OneMeta installed.
Text, Textarea, URL, Email, Date, Toggle, Select, Checkbox, Radio, Button Group, Image, File, Gallery, and Repeater — 14 field types in total.
Yes. When creating a field group, select User Meta as the type to add fields to user profiles.
Yes. Field data is accessible via the WordPress REST API on post and user endpoints.
WordPress 6.8 or higher and PHP 8.2 or higher.
Use the onemeta_get_meta() function for post fields and onemeta_get_user_meta() for user fields:
$value = onemeta_get_meta( get_the_ID(), 'your_field_key' );
Do not include the onemeta_ prefix — it is added automatically.