tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'bpl' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'bpl_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } endif; // bpl_setup add_action( 'after_setup_theme', 'bpl_setup' ); /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function bpl_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'bpl' ), 'id' => 'sidebar-1', 'description' => 'Display Widgets in the Sidebar', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'bpl_widgets_init' ); function create_widget( $name, $id, $description ) { register_sidebar(array( 'name' => $name , 'id' => $id, 'description' => $description , 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); } create_widget( 'Front Middle Top Left', 'front-top-middle-left', 'Displays on the left side of the frontpage top middle row' ); create_widget( 'Front Middle Top Center', 'front-top-middle-center', 'Displays on the center of the frontpage top middle row' ); create_widget( 'Front Middle Top Right', 'front-top-middle-right', 'Displays on the right side of the frontpage top middle row' ); create_widget( 'Front Middle Bottom Left', 'front-bottom-middle-left', 'Displays on the left side bottom of the frontpage bottom middle row' ); create_widget( 'Front Middle Bottom Center', 'front-bottom-middle-center', 'Displays on the center bottom of the frontpage bottom middle row' ); create_widget( 'Front Middle Bottom Right', 'front-bottom-middle-right', 'Displays on the right side bottom of the frontpage bottom middle row' ); create_widget( 'Front Third Left', 'front-third-left', 'Displays on the left side of the frontpage bottom row' ); create_widget( 'Front Third Right', 'front-third-right', 'Displays on the right side of the frontpage bottom row' ); create_widget( 'Footer Left', 'footer-left', 'Displays on the left of the Footer' ); create_widget( 'Footer Center', 'footer-center', 'Displays in the center of the Footer' ); create_widget( 'Footer Right', 'footer-right', 'Displays on the right of the Footer' ); /** * Enqueue scripts and styles. */ function bpl_scripts() { wp_enqueue_style('bootstrap_css', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style('animate_css', get_template_directory_uri() . '/css/animations.css' ); wp_enqueue_style('font_awesome_css', get_template_directory_uri() . '/font-awesome/css/font-awesome.min.css' ); wp_enqueue_style('googlefont_css', '//fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,800|Playfair+Display:400,700,9'); wp_enqueue_style( 'bpl-style', get_stylesheet_uri() ); global $wp_scripts; wp_register_script( 'html5_shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', '', '', false); wp_register_script( 'respond_js', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', '', '', false); $wp_scripts->add_data( 'html5_shiv', 'conditional', 'lt IE 9'); $wp_scripts->add_data( 'respond_js', 'conditional', 'lt IE 9'); wp_enqueue_script( 'bootstrap_js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '', true); wp_enqueue_script( 'animate_js', get_template_directory_uri() . '/js/css3-animate-it.js', array('jquery'), '', true); wp_enqueue_script( 'theme-js', get_template_directory_uri() . '/js/theme.js', array('jquery', 'bootstrap_js'), '', true); wp_enqueue_script( 'bpl-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'bpl_scripts' ); /** * editor style **/ function bpl_add_editor_styles() { add_editor_style( array( get_template_directory_uri() . '/css/bootstrap.min.css' ,'editor-style.css' ) ); } add_action( 'admin_init', 'bpl_add_editor_styles' ); /** * Add breadcrumbs functionality to your WordPress theme * * Once you have included the function in your functions.php file * you can then place the following anywhere in your theme templates * if(function_exists('mine_breadcrumbs')) mine_breadcrumbs(); * * */ function mine_breadcrumbs() { if(!is_front_page()) { echo ''; } } // Register Custom Navigation Walker require_once('wp_bootstrap_navwalker.php'); /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ // require get_template_directory() . '/inc/jetpack.php';