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' ); add_image_size( 'recipe-thumb', 375, 375, true ); add_image_size( 'slide-thumbnail', 1050, 550, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'biscuit-lite' ), ) ); // Enable support for Post Formats. add_theme_support( 'post-formats', array( 'image', 'gallery', 'video', 'quote', 'audio' ) ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'biscuit_lite_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Enable support for HTML5 markup. add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', 'gallery', 'caption', ) ); // custom logo add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); // enable feature custom header add_theme_support( 'custom-header' ); } endif; // biscuit_lite_setup add_action( 'after_setup_theme', 'biscuit_lite_setup' ); /** * Custom Editor Style * * @since biscuit-lite 1.0.0 */ function biscuit_lite_add_editor_styles() { add_editor_style( 'editor-style.css' ); } add_action( 'init', 'biscuit_lite_add_editor_styles' ); /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function biscuit_lite_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'biscuit-lite' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); register_sidebar( array( 'name' => __( 'Sidebar Footer 1', 'biscuit-lite' ), 'id' => 'sidebar-2', 'description' => '', 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); register_sidebar( array( 'name' => __( 'Sidebar Footer 2', 'biscuit-lite' ), 'id' => 'sidebar-3', 'description' => '', 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); register_sidebar( array( 'name' => __( 'Sidebar Footer 3', 'biscuit-lite' ), 'id' => 'sidebar-4', 'description' => '', 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); } add_action( 'widgets_init', 'biscuit_lite_widgets_init' ); /** * Enqueue scripts and styles. */ function biscuit_lite_scripts() { wp_enqueue_style( 'biscuit-style', get_stylesheet_uri() ); wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/css/font-awesome.css' ); wp_enqueue_script( 'jquary-fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', array( 'jquery' ), '1.1' ); wp_enqueue_script( 'jquery-retina', get_template_directory_uri() . '/js/retina.js', array('jquery'), '1.3.0', true ); wp_enqueue_script( 'biscuit-plugins', get_template_directory_uri() . '/js/plugins.js', array(), '20120206', true ); wp_enqueue_script( 'biscuit-scripts', get_template_directory_uri() . '/js/scripts.js', array(), '20130115', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'biscuit_lite_scripts' ); /** * Load dashboard */ require get_template_directory() . '/inc/dashboard/class-hs-dashboard.php'; $dashboard = new Biscuit_Lite_Dashboard; /** * Add "pro" link to the customizer * */ require get_template_directory() . '/inc/customize-pro/class-customize.php'; /** * Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags */ 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'; /** * Load Custom Widgets */ require get_template_directory() . '/inc/widgets.php'; /** * Include the TGM_Plugin_Activation class. */ require get_template_directory() . '/inc/class-tgm-plugin-activation.php'; function biscuit_lite_register_required_plugins() { $plugins = array( array( 'name' => 'WP Recipe Maker', 'slug' => 'wp-recipe-maker', 'required' => false, ), array( 'name' => 'WP Instagram Widget', 'slug' => 'wp-instagram-widget', 'required' => false, ), array( 'name' => 'Contact Form by WPForms', 'slug' => 'wpforms-lite', 'required' => false, ), array( 'name' => 'Jetpack', 'slug' => 'jetpack', 'required' => false, ), ); $config = array( 'id' => 'biscuit-lite', 'default_path' => '', 'menu' => 'tgmpa-install-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => false, 'message' => '', ); tgmpa( $plugins, $config ); } add_action( 'tgmpa_register', 'biscuit_lite_register_required_plugins' ); /** * Returns a "Read more" link for excerpts * * @since biscuit-lite 1.0.0 */ function biscuit_lite_excerpt_more( $more ) { if (is_admin()) return $more; return '' . __( 'Read more', 'biscuit-lite' ) . ''; } add_filter( 'excerpt_more', 'biscuit_lite_excerpt_more' ); /** * Add to scroll top */ function biscuit_lite_scroll_to_top() { ?>