Home › Forums › ACF PRO › Is it possible to add an ACF field to an existing metabox › Reply To: Is it possible to add an ACF field to an existing metabox
Is this possible today (Feb 2020)?
This below code adds markup inside “submitdiv”. The div that holds Status, Visibility, Published on and Publish/Update button. I would like to add an ACF Checkbox field under those settings. Is this possible with some function, action or filter combination?
add_action( 'post_submitbox_misc_actions', 'wpse_45720_submitdiv_extra' );
//add_action( 'post_submitbox_start', 'wpse_45720_submitdiv_extra' );
function wpse_45720_submitdiv_extra()
{
//print '<pre>' . current_filter() . '</pre>';
echo '<div class="misc-pub-section misc-something" id="something">';
echo '<p>Headline</p>';
//ACF CHECKBOX FIELD HERE
echo '<p>Some note under the ACF</p>';
echo '</div>';
}
//reference: https://wordpress.stackexchange.com/a/45722
If it’s not possbile then perhaps just show the checked selections (with get_field) and inform the user that in order to change the selections scroll to the field group titled “Your checkboxes”.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.