false, 'width' => 1000, 'height' => 364, 'flex-height' => true, ) ); /* Custom background support */ add_theme_support( 'custom-background', array( 'default-color' => '111111', 'default-image' => get_template_directory_uri() . '/img/zwartevilt.png', ) ); } 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; } add_action( 'template_redirect', 'blackoot_content_width' ); /* * Page Title */ function blackoot_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'blackoot' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'blackoot_wp_title', 10, 2 ); /* * 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; return $args; } add_filter( 'wp_page_menu_args', 'blackoot_page_menu_args' ); /* * Add parent Class to parent menu items */ function blackoot_add_menu_parent_class( $items ) { $parents = array(); foreach ( $items as $item ) { if ( $item->menu_item_parent && $item->menu_item_parent > 0 ) { $parents[] = $item->menu_item_parent; } } foreach ( $items as $item ) { if ( in_array( $item->ID, $parents ) ) { $item->classes[] = 'menu-parent-item'; } } return $items; } add_filter( 'wp_nav_menu_objects', 'blackoot_add_menu_parent_class' ); /* * Register Sidebar and Footer widgetized areas */ function blackoot_widgets_init() { register_sidebar( array( 'name' => __( 'Default Sidebar', 'blackoot' ), 'id' => 'sidebar', 'before_title' => '