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 https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => esc_html__( 'Primary Menu', 'bassist' ), 'social' => esc_html__( 'Social Links Menu', 'bassist' ), ) ); /* * 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', ) ); add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat', ) ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style( array( 'css/editor-style.css', 'css/font-awesome.css', bassist_fonts_url() ) ); // Add theme support for Custom Header add_theme_support( 'custom-header', array( 'default-image' => '', 'default-text-color' => '000000', 'width' => 1920, 'height' => 112, 'header-text' => true, 'wp-head-callback' => 'bassist_header_style', ) ); // Add theme support for Custom Background add_theme_support( 'custom-background', array( 'default-color' => 'f2f2ef', ) ); // Add theme support for Custom Logo add_theme_support( 'custom-logo', array( 'width' => 100, 'height' => 100, 'flex-width' => true, 'flex-height' => false, ) ); } endif; add_action( 'after_setup_theme', 'bassist_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function bassist_content_width() { $GLOBALS['content_width'] = apply_filters( 'bassist_content_width', 1200 ); } add_action( 'after_setup_theme', 'bassist_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function bassist_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'bassist' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'bassist' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar(array( 'name' => esc_html__( 'Contact Area', 'bassist' ), 'id' => 'contact-area', 'description' => esc_html__( 'Add the contact form here.', 'bassist' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } add_action( 'widgets_init', 'bassist_widgets_init' ); if ( ! function_exists( 'bassist_fonts_url' ) ) : /** * Register Google fonts for Twenty Sixteen. * * Create your own bassist_fonts_url() function to override in a child theme. * * @since Bassist 1.0 * * @return string Google fonts URL for the theme. */ function bassist_fonts_url() { $fonts_url = ''; $fonts = array(); $subsets = 'latin,latin-ext'; /* translators: If there are characters in your language that are not supported by Merriweather, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Merriweather font: on or off', 'bassist' ) ) { $fonts[] = 'Merriweather:400,700,900,400italic,700italic,900italic'; } /* translators: If there are characters in your language that are not supported by Montserrat, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'bassist' ) ) { $fonts[] = 'Montserrat:400,700'; } /* translators: If there are characters in your language that are not supported by Inconsolata, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'bassist' ) ) { $fonts[] = 'Inconsolata:400'; } if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => urlencode( implode( '|', $fonts ) ), 'subset' => urlencode( $subsets ), ), 'https://fonts.googleapis.com/css' ); } return $fonts_url; } endif; /** * Enqueue scripts and styles. */ function bassist_scripts() { // Add custom fonts, used in the main stylesheet. wp_enqueue_style( 'bassist-fonts', bassist_fonts_url(), array(), null ); wp_enqueue_style( 'bassist-style', get_stylesheet_uri() ); wp_enqueue_style( 'bassist-font-awesome', get_template_directory_uri() . '/css/font-awesome.css'); //wp_enqueue_script( 'bassist-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true ); wp_enqueue_script( 'bassist-scripts', get_template_directory_uri() . '/js/functions.js', array('jquery'), '20151215', true ); //wp_enqueue_script( 'bassist-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'bassist_scripts' ); /** * 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';