Support » Plugin: Advanced Custom Fields » [Plugin: Advanced Custom Fields] The way the plugin add meta boxes breaks can be improvred

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Elliot Condon


    Hi Marko,

    Thanks for the message. However, I think the language barrier is making it hard for me to understand your point.

    You say that “the way you add meta boxes is wrong and that it would be a better way to add them when the action add_meta_boxes is called.”

    could you elaborator on that a bit more? ACF does make use of the add_meta_boxes function in the admin_head action.

    Also, the code you linked to doesn’t help me understand what is happening.


    Hey Elliot,

    At this moment you make use of function add_meta_box() but you add them from the hook/action admin_head. In my opinion that is wrong and should been called from out the hook/action add_meta_boxes. When that happens my plugins (maybe others) doesn’t have to add extra code.

    The code what I referred to is your own code but then in my plugin. To make it compatible with your plugin.

    If that isn’t possible it would help me if the add_meta_box code in your plugin would be in a separate function. Your plugin would even be more robust since you can remove duplicated code and in my plugin I can call the function instead of copy the code from your plugin.


    Plugin Author Elliot Condon


    Hi Marko,

    I’ve just posted a comment on the other topic which unfortunately outlines how our plugins are incompatible…

    ACF add’s the metaboxes “on the fly” after using “location rules” to match the field groups to the current page.

    This means no plugin (not even ACF) will see any metaboxes added to a post type until you are on a post edit screen.

    Any chance you can add a filter into your plugin to allow for 3rd party devs (me) to add metaboxes into the global $wp_meta_boxes?

    * I think if I can hook into your plugin in the _get_metaboxes function, we should be able to find a solution!


    I’m busy with that already on my github repository. The code is now messed up due a rewrite to be able to add tabs on multiple places.

    Hopefully I will manage to have a final version by the end of this week.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Advanced Custom Fields] The way the plugin add meta boxes breaks can be improvred’ is closed to new replies.