For ACF Rules to create a set of rules to determine which edit screens will use these fields.

/**
 * Site Options
 */
add_action( 'acf/init', 'nu_register_options_pages' );
function nu_register_options_pages() {
	if ( function_exists( 'acf_add_options_page' ) ) {
		$site_options = acf_add_options_page(
			array(
				'page_title' => __( 'Site Options' ),
				'menu_title' => __( 'Site Options' ),
				'menu_slug'  => 'site-options',
				'capability' => 'edit_posts',
				'redirect'   => false,
			)
		);

		$contact_details = acf_add_options_page(
			array(
				'page_title'  => __( 'Contact Details' ),
				'menu_title'  => __( 'Contact Details' ),
				'menu_slug'   => 'contact-details',
				'parent_slug' => $site_options['menu_slug'],
			)
		);

		$social_details = acf_add_options_page(
			array(
				'page_title'  => __( 'Social Details' ),
				'menu_title'  => __( 'Social Details' ),
				'menu_slug'   => 'social-details',
				'parent_slug' => $site_options['menu_slug'],
			)
		);
	}
}

Contact me.

I would love to hear from you, send me a message using the form below.

    ×