for posts and comments. add_theme_support( 'automatic-feed-links' ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); // Enable support for Post Thumbnails. add_theme_support( 'post-thumbnails' ); // Set custom image sizes add_image_size( 'satu-featured', 692, 380, true ); add_image_size( 'satu-cover', 1280, 500, true ); // Register custom navigation menu. register_nav_menus( array( 'primary' => esc_html__( 'Primary Location', 'satu' ) ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', 'gallery', 'caption' ) ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'satu_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); /* * Enable support for custom header. */ add_theme_support( 'custom-header', array( 'height' => 360, 'width' => 1280, 'flex-height' => true, 'header-text' => false ) ); // Enable support for Custom Logo add_theme_support( 'custom-logo', array( 'height' => 50, 'width' => 200, 'flex-width' => true, 'flex-height' => true, ) ); // This theme uses its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); // Indicate widget sidebars can use selective refresh in the Customizer. add_theme_support( 'customize-selective-refresh-widgets' ); } endif; add_action( 'after_setup_theme', 'satu_theme_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 satu_content_width() { $GLOBALS['content_width'] = apply_filters( 'satu_content_width', 692 ); } add_action( 'after_setup_theme', 'satu_content_width', 0 ); /** * Registers new sidebar. * * @since 1.0.0 * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function satu_sidebars_init() { register_sidebar( array( 'name' => esc_html__( 'Footer Sidebar', 'satu' ), 'id' => 'footer', 'description' => esc_html__( 'The footer sidebar that appears on the bottom of your site.', 'satu' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); } add_action( 'widgets_init', 'satu_sidebars_init' ); /** * Register Open Sans Google font. * * @since 1.0.0 * @return string */ function satu_fonts_url() { $fonts_url = ''; $fonts = array(); $subsets = 'latin,latin-ext'; /* * Translators: If there are characters in your language that are not supported * by Open Sans, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'satu' ) ) { $fonts[] = 'Open Sans:400,400italic,700,700italic,600,600italic'; } /* * Translators: If there are characters in your language that are not supported * by Lora, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Lora font: on or off', 'satu' ) ) { $fonts[] = 'Lora:400,400italic,700,700italic'; } /* * Translators: To add an additional character subset specific to your language, * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language. */ $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'satu' ); if ( 'cyrillic' == $subset ) { $subsets .= ',cyrillic,cyrillic-ext'; } elseif ( 'greek' == $subset ) { $subsets .= ',greek,greek-ext'; } elseif ( 'devanagari' == $subset ) { $subsets .= ',devanagari'; } elseif ( 'vietnamese' == $subset ) { $subsets .= ',vietnamese'; } if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => urlencode( implode( '|', $fonts ) ), 'subset' => urlencode( $subsets ), ), 'https://fonts.googleapis.com/css' ); } return $fonts_url; } /** * Custom template tags for this theme. */ require trailingslashit( get_template_directory() ) . 'inc/template-tags.php'; /** * Enqueue scripts and styles. */ require trailingslashit( get_template_directory() ) . 'inc/scripts.php'; /** * Custom functions that act independently of the theme templates. */ require trailingslashit( get_template_directory() ) . 'inc/extras.php'; /** * Custom customizer functions. */ require trailingslashit( get_template_directory() ) . 'inc/customize.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php';