Solution: 1
Reorder your code as follows:
add_action('admin_menu', 'vc_add_theme_settings_pages');
add_action('admin_head', 'theme_styles');
add_action('admin_init', 'vc_add_theme_settings_page');
function vc_add_theme_settings_page() {
add_theme_page(
'Theme Settings', // Page title
'Theme Settings', // Menu title
'edit_theme_options', // Capability
'manage_options', // Menu slug
'vc_theme_page_display' // Callback function
);
}
Then, in your settings page template, replace:
<?php do_settings_sections('vc_theme_page'); ?>
with:
<?php do_settings_sections(__FILE__); ?>
This ensures WordPress correctly registers and displays your theme settings sections.