That’s perfect, thanks John!
Thanks John for the detailed response!
Method #1 is pretty much what I was anticipating would need to be done and is manageable.
The biggest thing I was wondering is if there’s a way to read the actual values back from the database and populate ACF with them in the admin interface when the user visits the options page next time?
Exactly like save_post but on the other end of the edit process.
If we have the normal settings pages disabled I don’t anticipate that there’d be a situation in which the two got out of sync, but in the event that a plugin or some other piece of the system would update the value of the options I’d prefer, for completeness, to make sure that new value is represented again in the ACF options page when opened.
Thanks Elliot. No hurry, neither of the issues are show stoppers, just wanted to point out my experience in case it will help improve the functionality.
Really appreciate what you’ve done with this plugin, it’s completely revolutionized the way I use WordPress.
I would really love to see this in the ACF relationships field as well. I’m sure it’s a lot more technically complicated than it sounds, but it would be amazing.
This is the code that exhibits both issues: the title/menu switcharoo and the slug breaking my options page fields.
<?php
if( function_exists('acf_add_options_sub_page') )
{
acf_add_options_sub_page(array(
'title' => 'Mapping',
'menu' => 'Mapping Settings',
'parent' => 'options-general.php',
'slug' => 'mapping',
'capability' => 'manage_options'
));
}
?>
Whoops, must’ve thought of better terms to search for this time as I just stumbled across something that will hopefully at least guide me in the right direction:
http://support.advancedcustomfields.com/forums/topic/set-custom-post-type-title-by-acf/
I’ve confirmed the following:
1. Creating an options page, then changing the title/menu name options does break the page<->field group link. Revisiting the field group and updating it re-associates things correctly.
2. Adding a ‘slug’ argument breaks things completely. The behavior in #1 would be expected, however upon updating the field group those fields still do not show up in the options page. Even if I add a ‘slug’ argument before creating a new field group there still seems to be no association between the options page and field group.
Also just noticed that adding a ‘slug’ argument goofs up the field group rules. In the example provided above my field group rule says “Show this field group if Options Page is equal to Mapping” but then upon visiting the generated options page I get the “No Custom Field Group found for the options page.” message.
I’m new to this addon so could be doing something wrong but something seems to be acting up.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.