Support

Account

Home Forums ACF PRO Add a 'Select header layout' option to Options Page (ACF Pro) Reply To: Add a 'Select header layout' option to Options Page (ACF Pro)

  • get_header() can be called with an empty string or a value of false or null and all of these are the equivalent of calling the function without the name value. For example, all of these are the same

    
    get_header();
    get_header('');
    get_header(false);
    get_header(null);
    

    So all you really need to do is get the option an have the values be whatever the name is. If no value is set then then default header.php will be used

    
    get_header(get_field('header_option_field', 'options'));