Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' );
- function enqueue_parent_theme_style() {
- wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
- }
- /**
- * Twenty Fourteen setup.
- *
- * Set up theme defaults and registers support for various WordPress features.
- *
- * Note that this function is hooked into the after_setup_theme hook, which
- * runs before the init hook. The init hook is too late for some features, such
- * as indicating support post thumbnails.
- *
- * @since Twenty Fourteen 1.0
- */
- function twentyfourteen_setup() {
- /*
- * Make Twenty Fourteen available for translation.
- *
- * Translations can be added to the /languages/ directory.
- * If you're building a theme based on Twenty Fourteen, use a find and
- * replace to change 'twentyfourteen' to the name of your theme in all
- * template files.
- */
- load_theme_textdomain( 'twentyfourteen', get_template_directory() . '/languages' );
- // This theme styles the visual editor to resemble the theme style.
- add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) );
- // Add RSS feed links to <head> for posts and comments.
- add_theme_support( 'automatic-feed-links' );
- // Enable support for Post Thumbnails, and declare two sizes.
- add_theme_support( 'post-thumbnails' );
- set_post_thumbnail_size( 672, 372, true );
- add_image_size( 'twentyfourteen-full-width', 1038, 576, true );
- // This theme uses wp_nav_menu() in two locations.
- register_nav_menus( array(
- 'primary' => __( 'Top primary menu', 'twentyfourteen' ),
- 'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ),
- ) );
- /*
- * Switch default core markup for search form, comment form, and comments
- * to output valid HTML5.
- */
- add_theme_support( 'html5', array(
- 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
- ) );
- /*
- * Enable support for Post Formats.
- * See http://codex.wordpress.org/Post_Formats
- */
- add_theme_support( 'post-formats', array(
- 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery',
- ) );
- // This theme allows users to set a custom background.
- add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array(
- 'default-color' => 'f5f5f5',
- ) ) );
- // Add support for featured content.
- add_theme_support( 'featured-content', array(
- 'featured_content_filter' => 'twentyfourteen_get_featured_posts',
- 'max_posts' => 6,
- ) );
- // This theme uses its own gallery styles.
- add_filter( 'use_default_gallery_style', '__return_false' );
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment