Add subemenu option page

I am sure other people could point out other methods, but I’m just putting here what I consider to be the fastest method: use Advanced Custom Fields PRO and their option pages functionality. From their documentation:

if( function_exists('acf_add_options_page') ) {

acf_add_options_page(array(
    'page_title'    => 'Theme General Settings',
    'menu_title'    => 'Theme Settings',
    'menu_slug'     => 'theme-general-settings',
    'capability'    => 'edit_posts',
    'redirect'      => false
));

acf_add_options_sub_page(array(
    'page_title'    => 'Theme Header Settings',
    'menu_title'    => 'Header',
    'parent_slug'   => 'theme-general-settings',
));

acf_add_options_sub_page(array(
    'page_title'    => 'Theme Footer Settings',
    'menu_title'    => 'Footer',
    'parent_slug'   => 'theme-general-settings',
));

}

Then, when you need any of the values from the option pages, just use something like this:

$option_x = get_field('option_x', 'options');

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)