tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /** * Use valid HTML5 markup for the comments, the search form and the comment form. */ add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', ) ); /** * Add support for post formats. */ add_theme_support( 'post-formats', array( 'aside', 'gallery', 'image', 'link', 'quote', 'video', ) ); /** * This theme uses wp_nav_menu() in two locations. */ register_nav_menus( array( 'primary' => __( 'Primary Menu', 'motif' ), 'secondary' => __( 'Footer Menu', 'motif' ), ) ); /** * Enable support for post thumbnails. */ add_theme_support( 'post-thumbnails' ); /** * Add the various thumbnail sizes. */ // Post thumbnails set_post_thumbnail_size( 705, 435, true ); // Hero Image on the front page template add_image_size( 'motif-hero-thumbnail', 1140, 610, true ); // Full width and grid page template add_image_size( 'motif-page-thumbnail', 1072, 435, true ); // Grid child page thumbnail add_image_size( 'motif-grid-thumbnail', 334, 233, true ); // Testimonial thumbnail add_image_size( 'motif-testimonial-thumbnail', 90, 90, true ); /** * Add manual excerpts support to pages. */ add_post_type_support( 'page', 'excerpt' ); /** * Setup the WordPress core custom background feature. */ add_theme_support( 'custom-background', apply_filters( 'motif_custom_background_args', array( 'default-color' => 'f3f3f3', 'default-image' => get_template_directory_uri() . '/images/body-bg.png', ) ) ); } add_action( 'after_setup_theme', 'motif_setup' ); /** * Returns the Google font stylesheet URL, if available. */ function motif_fonts_url() { $fonts_url = ''; /* translators: If there are characters in your language that are not supported * by Droid Serif, translate this to 'off'. Do not translate into your own language. */ $droid_serif = _x( 'on', 'Droid Serif font: on or off', 'motif' ); /* translators: If there are characters in your language that are not supported * by Droid Sans, translate this to 'off'. Do not translate into your own language. */ $droid_sans = _x( 'on', 'Droid Sans font: on or off', 'motif' ); if ( 'off' !== $droid_serif || 'off' !== $droid_sans ) { $font_families = array(); if ( 'off' !== $droid_serif ) $font_families[] = 'Droid Serif:400,400italic,700,700italic'; if ( 'off' !== $droid_sans ) $font_families[] = 'Droid Sans:400,700'; $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin' ), ); $fonts_url = add_query_arg( $query_args, "https://fonts.googleapis.com/css" ); } return $fonts_url; } /** * Register widgetized area and update sidebar with default widgets. */ function motif_widgets_init() { register_sidebar( array( 'name' => __( 'Main Sidebar', 'motif' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '