I’ve created an ACF block that pulls posts from chosen categories of the main blog to be used on any of the subsites in my multisite network. It works great.
I’ve followed this example:
https://support.advancedcustomfields.com/forums/topic/display-list-of-category-from-multisite-in-theme-option/
However, I would like to programmatically load the custom fields so that I can easily reuse the block across the network. When I generate the PHP for the fields, the choices are hard coded. Is it possible to generate the array of choices on the fly so the list stays up to date as I add and remove categories?
This was a really obvious answer. I just deleted the array of hard coded categories and replaced it with an empty array. Categories automatically load fine now.