This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled functions.php

By: a guest on Apr 4th, 2014  |  syntax: None  |  size: 1.57 KB  |  views: 47  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. if ( ! function_exists( 'untitled_setup' ) ) :
  3. /**
  4.  * Sets up theme defaults and registers support for various WordPress features.
  5.  *
  6.  * Note that this function is hooked into the after_setup_theme hook, which runs
  7.  * before the init hook. The init hook is too late for some features, such as indicating
  8.  * support post thumbnails.
  9.  *
  10.  * @since untitled 1.0
  11.  */
  12. function untitled_setup() {
  13.  
  14.         /**
  15.          * Make theme available for translation
  16.          * Translations can be filed in the /languages/ directory
  17.          * If you're building a theme based on untitled, use a find and replace
  18.          * to change 'untitled' to the name of your theme in all the template files
  19.          */
  20.         load_theme_textdomain( 'untitled', get_template_directory() . '/languages' );
  21.  
  22.         /**
  23.          * Add default posts and comments RSS feed links to head
  24.          */
  25.         add_theme_support( 'automatic-feed-links' );
  26.  
  27.         /**
  28.          * Enable support for Post Thumbnails
  29.          */
  30.         add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );
  31.         set_post_thumbnail_size( 150, 150 );
  32.         add_image_size( 'slider-img', 1440, 700, true );
  33.         add_image_size( 'content-img', 300, 168, true );
  34.         add_image_size( 'thumbnail-img', 62, 62, true );
  35.         add_image_size( 'feat-img', 1000 );
  36.  
  37.         /**
  38.          * This theme uses wp_nav_menu() in one location.
  39.          */
  40.         register_nav_menus( array(
  41.                 'primary' => __( 'Primary Menu', 'untitled' ),
  42.         ) );
  43.  
  44.         /**
  45.          * Enable support for Post Formats
  46.          */
  47.         add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
  48. }
  49. endif; // untitled_setup
  50. add_action( 'after_setup_theme', 'untitled_setup' );
  51. ?>
clone this paste RAW Paste Data