Advertisement
rexcoder

After Setup Theme

Jan 3rd, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.86 KB | None | 0 0
  1. /*From UnderScore Theme*/
  2. if ( ! function_exists( 'myrex_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
  7.  * runs before the init hook. The init hook is too late for some features, such
  8.  * as indicating support for post thumbnails.
  9.  */
  10. function myrex_setup() {
  11.  
  12.     /*
  13.      * Make theme available for translation.
  14.      * Translations can be filed in the /languages/ directory.
  15.      * If you're building a theme based on myrex, use a find and replace
  16.      * to change 'myrex' to the name of your theme in all the template files
  17.      */
  18.     load_theme_textdomain( 'myrex', get_template_directory() . '/languages' );
  19.  
  20.     // Add default posts and comments RSS feed links to head.
  21.     add_theme_support( 'automatic-feed-links' );
  22.  
  23.     /*
  24.      * Enable support for Post Thumbnails on posts and pages.
  25.      *
  26.      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
  27.      */
  28.     //add_theme_support( 'post-thumbnails' );
  29.  
  30.     // This theme uses wp_nav_menu() in one location.
  31.     register_nav_menus( array(
  32.         'primary' => __( 'Primary Menu', 'myrex' ),
  33.     ) );
  34.  
  35.     /*
  36.      * Switch default core markup for search form, comment form, and comments
  37.      * to output valid HTML5.
  38.      */
  39.     add_theme_support( 'html5', array(
  40.         'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
  41.     ) );
  42.  
  43.     /*
  44.      * Enable support for Post Formats.
  45.      * See http://codex.wordpress.org/Post_Formats
  46.      */
  47.     add_theme_support( 'post-formats', array(
  48.         'aside'
  49.     ) );
  50.  
  51.     // Setup the WordPress core custom background feature.
  52.     // add_theme_support( 'custom-background', apply_filters( 'myrex_custom_background_args', array(
  53.         // 'default-color' => 'ffffff',
  54.         // 'default-image' => '',
  55.     // ) ) );
  56. }
  57. endif; // myrex_setup
  58. add_action( 'after_setup_theme', 'myrex_setup' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement