Home Forums Backend Issues (wp-admin) Filter the priority of meta boxes


Filter the priority of meta boxes

    • Johan

    • January 23, 2014 at 3:06 am


    Is it somehow possible to change the priority of meta boxes on the post screen from high to low? Maybe with a filter?

    • Elliot

    • January 24, 2014 at 9:14 am

    Hi @johan

    All ACF field groups are given a ‘high’ priority, but you can use the menu_order to move them around. This is a setting in each field group.


    • Johan

    • January 28, 2014 at 5:59 am

    Yes that’s correct but I have meta boxes from other plugins that also have their priority set to high and I would like to have all afc meta boxes last.

    It would have been a quick fix if I could have filtered the priority to low, but after a closer look it seems like that’s not possible.

    Do you know of any other way to achieve this? I was thinking about removing them with remove_meta_box() and then add them again with add_meta_box() but would that be safe?

    • Elliot

    • January 28, 2014 at 9:41 am

    Hi @johan

    The code that ACF uses to add the mtabox can be found on line 200 of core/controllers/post.php.

    Perhaps I should add in some filters for the position and priority?

    Cheers mate, I’ll ad it the to-do and let you know how I get on.

    For now, perhaps you can add in a custom filter for the time being?


    • Johan

    • January 29, 2014 at 5:58 am

    He Elliot

    It’s already possible to change the position so it might be a bit overkill to have a filter for that. But to either have a filter for the priority or possibility even to choose it in the administration where you can choose the position today, probably would not hurt.

    I’m leaning towards hard coding in apply_filters('afc_meta_box_priority', $priority) for now or use the $wp_meta_boxes array to reorder the meta boxes.

    Anyway thanks for all your help and again for an awesome plugin!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.