I’ve found myself in a situation where I would benefit from using the WordPress native admin tabs, but I’m not really sure where to start when ACF is concerned.
The goal is to take data that a user has entered into a repeater field, and use it to populate a select field further down the page.
I currently have all my fields on the one options page, and everything works fine for the most part. Data entered into the repeater is saving just fine, but then the page also needs an additional refresh in order to populate the select fields that are using that data.
I can’t use the ACF tabs field, as the data in one tab is dependent on another, and requires a save and reload before switching tabs. I’d also prefer to avoid using multiple menu items to avoid user confusion. So, I figure the WordPress native admin tabs are the way to go.
Is this actually possible with the way ACF creates and assigns pages as submenu items? I really just need a nudge in the right direction at the moment, as I can handle working with the tabs. I’m just not sure where to even start…
I’m referring to the tabs you see in Appearance > Themes. I’ve attached a screenshot for your reference.
I’m hoping to add the same tabs, maybe in the Widgets page, so that I can include my custom settings.
I’m creating a system whereby the site owner can create as many sidebars as they like and then assign them to areas of their site. So far, everything is gold, I’m just trying to organise the admin a little better.
I think the best approach would be to enable ACF custom fields to be hooked. If that were possible, the WP admin page could then be constructed manually, using WP functions, but the developer could add in their own hooks, thereby allowing them to hook ACF fields into their own admin page.
I created a feature request post earlier this morning for you, so if you ever get around to that, I certainly look forward to it.
The topic ‘Options pages across native WordPress admin tabs?’ is closed to new replies.
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!