tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 400, 'width' => 580, 'flex-height' => true, 'flex-width' => true, 'header-text' => array( 'site-title', 'site-description' ), ) ); /* * 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' ); // Theme Image Sizes add_image_size( 'allium-featured', 700, 525, true ); // This theme uses wp_nav_menu() in four locations. register_nav_menus( array ( 'header-menu' => esc_html__( 'Header Menu', 'allium' ), ) ); // This theme styles the visual editor to resemble the theme style. add_editor_style( array ( 'css/editor-style.css', allium_fonts_url() ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'allium_custom_background_args', array ( 'default-color' => 'f9f9f9', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /* * Add support for full and wide align images. * @see https://wordpress.org/gutenberg/handbook/extensibility/theme-support/#wide-alignment */ add_theme_support( 'align-wide' ); } endif; // allium_setup add_action( 'after_setup_theme', 'allium_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 allium_content_width() { // This variable is intended to be overruled from themes. // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}. // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $GLOBALS['content_width'] = apply_filters( 'allium_content_width', 769 ); } add_action( 'after_setup_theme', 'allium_content_width', 0 ); /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function allium_widgets_init() { // Widget Areas register_sidebar( array( 'name' => esc_html__( 'Main Sidebar', 'allium' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'allium' ), 'before_widget' => '', 'before_title' => '