Home › Forums › Backend Issues (wp-admin) › Add submenu to a custom post type menu › Reply To: Add submenu to a custom post type menu
if you would like to add option page as a submenu of a custom posttype than use of that custom posttype as parent_slug
if(function_exists(acf_add_options_page))
{
acf_add_options_page(array(
'page_title' => 'Emplacements de diffusion',
'menu_title' => 'Emplacements de diffusion',
'menu_slug' => 'options_emplacements',
'capability' => 'edit_posts',
'parent_slug' => 'edit.php?post_type=YOURCUSTOMPOSTTYPENAME',
'position' => false,
'icon_url' => 'dashicons-images-alt2',
'redirect' => false,
));
}
replace YOURCUSTOMPOSTTYPENAME with your customposttype
hope that is what you wish. else i misunderstood what you would like to do.
to show acf fields at this site:
set position rules to => show when options-site is equal to “Emplacements de diffusion”
to show value at fronpage use <?php the_field('my_acf_field_at_this_optionpage', 'option'); ?>
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.