Skip to content

Instantly share code, notes, and snippets.

@bohnna
Last active July 8, 2016 21:09
Show Gist options
  • Save bohnna/74578f952172bb0ad805ab55e52f4518 to your computer and use it in GitHub Desktop.
Save bohnna/74578f952172bb0ad805ab55e52f4518 to your computer and use it in GitHub Desktop.
// The whole idea is to set the parent_slug to 'edit.php?post_type=cpt-name
// Everything else you can customize as you need to.
// Replace {posttype} with your post type name. (Without the brackets of course)
${posttype}_options_page = acf_add_options_page(array(
'page_title' => '{posttype} Options',
'menu_title' => '{posttype} Options',
'menu_slug' => 'acf-cpt-{posttype}',
'capability' => 'edit_posts',
'position' => false,
'parent_slug' => 'edit.php?post_type={posttype}',
'icon_url' => false,
'redirect' => false,
'post_id' => '{posttype}_options',
'autoload' => false
));
@Tusko
Copy link

Tusko commented Jul 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment