Add custom header

The best way to add the custom header functionality in WordPress is by hooking into the ‘after_setup_theme’ function as follows.

// Add custom header
add_action( 'after_setup_theme', 'add_custom_header' );
function add_custom_header() {
   add_theme_support( 'custom-header' );
}