| 开发者 | MaximeBJ |
|---|---|
| 更新时间 | 2026年11月13日 00:05 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
get_field(), the_field(), field names as you write them, ACF-shaped map values. Modern Fields Pro migrates a whole site from ACF or SCF in a few steps.
[youtube https://youtu.be/vMYajLYcwRA]
/wp-content/plugins/modern-fields directory.get_field() in PHP.Yes. Modern Fields covers what most sites use ACF for (field groups, location rules, field types, get_field() and the_field()), with field groups designed in the block editor and values displayed through block bindings. Its values are standard WordPress metadata.
Yes, with the ACF Migration (beta) of Modern Fields Pro, from ACF or ACF Pro 6.1 or later, or from Secure Custom Fields. It reads your field groups, shows a plan of what will be imported and what will not, then moves the field groups, their values, options pages, post types and taxonomies. You can keep the original values beside the new ones, or put them back afterwards. Flexible Content and ACF blocks are not imported yet. Back up your site and try the migration on a staging copy first.
Yes. Modern Fields is built for the block editor, and field groups also show in the classic editor through metaboxes, WooCommerce products included.
Use the Field Value block in your content or your templates: it binds a field to a core block (Paragraph, Heading, Image or Button). No code required. In PHP, get_field() and the_field() read the values in your templates and custom blocks.
In the standard WordPress tables: post, term and user metadata, and options for dashboard widgets. A value is stored under its field's name, so get_post_meta() reads it too.
Yes. Only the users who administer Modern Fields can create or edit field groups, and each field group chooses the roles that fill it in. Permissions integrate with WordPress roles and capabilities.
wp modern-fields import command and its --dry-run show the unchanged items, and --force leaves them aloneshow_in_rest off, as is common for post types edited in the classic editor) could not be searched, the post type was missing from the field settings, its archive from the Link field, and the posts already linked showed as "#123, unavailable". They are now searched, offered and named like any other. Drafts and private posts stay limited to the users who may read themC:\Users was saved as C:Users& became & (Prix & TVA showed up as Prix & TVA) and anything between < and > was dropped, choice values included. Imports now follow the rule WordPress applies when you save the group in its editor, so an administrator gets the group back exactly as exported. Settings already damaged need retyping onceget_field(): modern-fields/get_field/value and modern-fields/get_field/name=field-namemodern-fields/permissions to change the minimum role permission to access the plugin