Okay
  Print

Adding page settings to custom post types, taxonomies and templates

Add the following to your child theme's functions.php file:

function ghostpool_custom_page_settings( $settings ) {
    
    // Custom page template
    if ( is_page_template( 'custom-page-template.php' ) ) {
        $settings['header'] = 'gp-fullwidth-page-header';
        $settings['layout'] = 'gp-left-sidebar';
    }
    // Custom post type
    if ( is_singular( 'custom_post_type' ) ) {
       $settings['header'] = 'gp-standard-page-header';
       $settings['layout'] = 'gp-right-sidebar';
    }
    // Attachment page
    if ( is_attachment() ) {
        $settings['header'] ='gp-page-header-disabled';
        $settings['layout'] = 'gp-no-sidebar';
    }
    return $settings;
}
add_filter( 'ghostpool_page_settings', 'ghostpool_custom_page_settings' );

In this example you're loading your own header and layout settings for a custom page template, custom post type and attachment page. You can see all the available settings from aardvark/lib/framework/settings/load-settings.php.