The Dynamic Options Pages module allows you to register and manage ACF Options Pages from your WordPress admin, in ACF > Options Pages menu.
All ACF settings can be set within the UI. See ACF Options Pages documentation.
The URL slug used to uniquely identify this options page. Defaults to a url friendly version of Menu Title
The title displayed in the wp-admin sidebar. Defaults to Page Title
The capability required for this menu to be displayed to the user. Defaults to edit_posts.
Read more about capability here: https://wordpress.org/support/article/roles-and-capabilities/
The position in the menu order this menu should appear. Defaults to bottom of utility menu items.
WARNING: if two menu items use the same position attribute, one of the items may be overwritten so that only one item displays!
Risk of conflict can be reduced by using decimal instead of integer values, e.g. 63.3 instead of 63.
The slug of another WP admin page. if set, this will become a child page.
The icon class for this menu. Defaults to default WordPress gear.
Read more about dashicons here: https://developer.wordpress.org/resource/dashicons/
If set to true, this options page will redirect to the first child page (if a child page exists). If set to false, this parent page will appear alongside any child pages. Defaults to true
The $post_id
to save/load data to/from. Can be set to a numeric post ID (123), or a string ('user_2'). Defaults to 'options'.
Whether to load the option (values saved from this options page) when WordPress starts up. Defaults to false.
The update button text.
The message shown above the form on submit.
The pro version allows developers to manually activate Options Pages individually using the “Active” switch in the sidebar.
The module is shipped with a fully functional Json/PHP Sync feature, cousin of the native ACF Field Group Json/PHP Sync.
Set settings in PHP on existing options pages or Export/Import using Json files.
ACF Extended use the native ACF setting show_admin
to determine if the module menu should be displayed or not. You can read more about that setting on the ACF article How to hide ACF menu from clients. Usage example:
add_filter('acf/settings/show_admin', '__return_false');
The Options Pages module is enabled by default. It can be enabled and disabled in the Settings UIPRO, or with the following code:
add_action('acf/init', 'my_acfe_modules');
function my_acfe_modules(){
// disable options pages
acf_update_setting('acfe/modules/options_pages', false);
}
add_action('acfe/init', 'my_acfe_modules');
function my_acfe_modules(){
// disable options pages
acfe_update_setting('modules/options_pages', false);
}