get( 'Version' ) ); /* * Setup and registration functions */ function blackoot_setup() { /* Translation support * Translations can be added to the /languages directory. * A .pot template file is included to get you started */ load_theme_textdomain( 'blackoot-lite', BLACKOOT_THEME_DIR . '/languages' ); // Content Width global $content_width; if ( ! isset( $content_width ) ) : $content_width = 680; endif; /* Feed links support */ add_theme_support( 'automatic-feed-links' ); /* Register menus */ register_nav_menu( 'primary', 'Navigation menu' ); register_nav_menu( 'footer-menu', 'Footer menu' ); /* Title tag support */ add_theme_support( 'title-tag' ); /* Post Thumbnails Support */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 680, 300, true ); /* Custom header support */ add_theme_support( 'custom-header', array( 'header-text' => false, 'width' => 1000, 'height' => 364, 'flex-height' => true, ) ); /* Custom background support */ add_theme_support( 'custom-background', array( 'default-color' => '111111', 'default-image' => BLACKOOT_THEME_DIR_URI . '/img/zwartevilt.png', ) ); /* Support HTML5 Search Form */ add_theme_support( 'html5', array( 'search-form' ) ); } add_action( 'after_setup_theme', 'blackoot_setup' ); /* Adjust $content_width depending on the page being displayed */ function blackoot_content_width() { global $content_width; if ( is_page_template( 'page-full-width.php' ) ) : $content_width = 920; endif; } add_action( 'template_redirect', 'blackoot_content_width' ); /* * Add a home link to wp_page_menu() ( wp_nav_menu() fallback ) */ function blackoot_page_menu_args( $args ) { if ( ! isset( $args['show_home'] ) ) : $args['show_home'] = true; endif; return $args; } add_filter( 'wp_page_menu_args', 'blackoot_page_menu_args' ); /* * Register Sidebar and Footer widgetized areas */ function blackoot_widgets_init() { register_sidebar( array( 'name' => __( 'Default Sidebar', 'blackoot-lite' ), 'id' => 'sidebar', 'before_title' => '