CPT Settings Page using ACF

In addition to top level option pages, you can create an options page that’s a subpage to an existing page. In this case, we’re creating a “Portfolio Settings” settings page that appears under the “Projects” CPT area in the backend.

/**
 * ACF Options Page 
 *
 */
function ea_acf_portfolio_page() {
    if ( function_exists( 'acf_add_options_sub_page' ) ){
 		 acf_add_options_sub_page( array(
			'title'      => 'Portfolio Settings',
			'parent'     => 'edit.php?post_type=project',
			'capability' => 'manage_options'
		) );
 	}
}
add_action( 'init', 'ea_acf_portfolio_page' );

Bill Erickson

Bill Erickson is the co-founder and lead developer at CultivateWP, a WordPress agency focusing on high performance sites for web publishers.

About Me
Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk