Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
function cameronjonesweb_acf_setup() {
acf_add_options_page(
array(
'page_title' => 'Theme Settings',
'menu_slug' => 'cameronjonesweb-theme-settings',
)
);
acf_add_local_field_group(
array(
'key' => 'group_cameronjonesweb_theme_settings',
'title' => 'Theme Settings',
'fields' => array(
array(
'key' => 'field_cameronjonesweb_default_image',
'label' => 'Default Featured Image',
'name' => 'default_featured_image',
'type' => 'image',
),
),
'location' => array (
array (
array (
'param' => 'options_page',
'operator' => '==',
'value' => 'cameronjonesweb-theme-settings',
),
),
),
)
);
}
add_action( 'acf/init', 'cameronjonesweb_acf_setup' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment