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' ); if ( function_exists( 'add_image_size' ) ) { add_image_size( 'blog2019-large-image', 1018, 9999, false ); add_image_size( 'blog2019-featured-image', 668, 334, true ); add_image_size( 'blog2019-mediumh-image', 520, 312, true ); add_image_size( 'blog2019-medium-image', 480, 360, true ); add_image_size( 'blog2019-mini-image', 100, 100, true ); } // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__('Primary Menu', 'blog2019') ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ $markup = array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' ); add_theme_support( 'html5', $markup ); add_theme_support( 'custom-logo', array( 'height' => 90, 'width' => 315, 'flex-height' => true, 'flex-width' => true, 'header-text' => array( 'site-title', 'site-description' ), ) ); // Support for Custom Header add_theme_support( 'custom-header', apply_filters( 'blog2019_custom_header_args', array( 'default-image' => '', 'default-text-color' => '333333', 'width' => 1050, 'height' => 200, 'flex-height' => true, 'wp-head-callback' => 'blog2019_header_style', 'uploads' => true, ) ) ); // Set up the WordPress core custom background feature. $background_args = array( 'default-color' => 'e6e6e6', 'default-image' => get_template_directory_uri() .'/assets/images/background.png', 'default-repeat' => 'repeat', 'default-position-x' => 'left', 'default-position-y' => 'top', 'default-size' => 'auto', 'default-attachment' => 'fixed', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => 'admin_head_callback_func', 'admin-preview-callback' => 'admin_preview_callback_func', ); add_theme_support( 'custom-background', apply_filters( 'blog2019_custom_background_args', $background_args) ); // Support for Custom Editor Style add_editor_style( 'css/editor-style.css' ); } endif; add_action( 'after_setup_theme', 'blog2019_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 blog2019_content_width() { $content_width = 667; if ( is_page_template( array( 'template-full-width-page.php', 'template-full-width-post.php' ) ) ) { $content_width = 1018; } if ( is_404() ) { $content_width = 1018; } $GLOBALS['content_width'] = apply_filters( 'blog2019_content_width', $content_width ); } add_action( 'template_redirect', 'blog2019_content_width', 0 ); require_once get_template_directory() . '/inc/functions/enqueue-scripts.php'; require_once get_template_directory() . '/inc/functions/widgets-init.php'; require_once get_template_directory() . '/inc/functions/social-buttons.php'; require_once get_template_directory() . '/inc/functions/author-bio-box.php'; require_once get_template_directory() . '/inc/functions/postmeta.php'; require_once get_template_directory() . '/inc/functions/posts-navigation.php'; require_once get_template_directory() . '/inc/functions/menu.php'; require_once get_template_directory() . '/inc/functions/featured-content.php'; require_once get_template_directory() . '/inc/functions/other.php'; require_once get_template_directory() . '/inc/admin/custom.php';