function grngrdn_setup() { add_theme_support('title-tag'); add_theme_support('automatic-feed-links'); /*automatic-feed-links*/ add_theme_support('post-thumbnails'); /*support thumbnails*/ if (!isset($content_width)) { global $content_width; $content_width = 560; /* pixels */ } add_image_size('grngrdn_post', 560, 9999, true); /*size for posts thumbnail*/ add_image_size('grngrdn_slider', 1920, 350, true); /*size for slider thumbnail*/ $bgdefaults = array('default-color' => '#f3f3f3', 'default-image' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => ''); add_theme_support('custom-background', $bgdefaults); /*adding custom background*/ $headerdefaults = array('default-image' => '', 'width' => 1920, 'height' => 200, 'flex-width' => false, 'flex-height' => false, 'random-default' => false, 'header-text' => true, 'default-text-color' => '6b9f3d', 'uploads' => true, 'wp-head-callback' => 'grngrdn_header_style', 'admin-head-callback' => '', 'admin-preview-callback' => ''); add_theme_support('custom-header', $headerdefaults); /*adding custom header*/ load_theme_textdomain('grngrdn', get_template_directory() . '/languages'); /*including textdomain*/ add_editor_style(get_template_directory_uri() . '/css/editor-style.css'); /*including editor style*/ register_nav_menu('menu', 'greengarden'); /*register navigation menu*/ }
function cw_theme_setup() { add_theme_support('menus'); register_nav_menu('primary', 'Primary Header Navigation'); /*register_nav_menu('primary-mobile', 'Primary Mobile Header Navigation');*/ register_nav_menu('secondary', 'Footer Navigation'); }
/** * Initial setup * * This function is attached to the 'after_setup_theme' action hook. * * @uses load_theme_textdomain() * @uses get_locale() * @uses BAVOTASAN_THEME_TEMPLATE * @uses add_theme_support() * @uses add_editor_style() * @uses add_custom_background() * @uses add_custom_image_header() * @uses register_default_headers() * * @since 1.0.0 */ function bavotasan_setup() { load_theme_textdomain('arcade', BAVOTASAN_THEME_TEMPLATE . '/library/languages'); // Add default posts and comments RSS feed links to <head>. add_theme_support('automatic-feed-links'); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style('library/css/admin/editor-style.css'); // This theme uses wp_nav_menu() in two location. register_nav_menu('primary', __('Primary Menu', 'arcade')); // Add support for a variety of post formats add_theme_support('post-formats', array('gallery', 'image', 'video', 'audio', 'quote', 'link', 'status', 'aside')); // This theme uses Featured Images (also known as post thumbnails) for archive pages add_theme_support('post-thumbnails'); add_image_size('half', 570, 220, true); add_image_size('square100', 100, 100, true); // Add a filter to bavotasan_header_image_width and bavotasan_header_image_height to change the width and height of your custom header. add_theme_support('custom-header', array('header-text' => false, 'flex-height' => true, 'flex-width' => true, 'random-default' => true, 'width' => apply_filters('bavotasan_header_image_width', 1800), 'height' => apply_filters('bavotasan_header_image_height', 1200))); // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers(array('header01' => array('url' => '%s/library/images/header01.jpg', 'thumbnail_url' => '%s/library/images/header01-thumbnail.jpg', 'description' => __('Default Header 1', 'arcade')))); // Add support for custom backgrounds add_theme_support('custom-background'); // Add HTML5 elements add_theme_support('html5', array('comment-list', 'comment-form')); // Add title tag support add_theme_support('title-tag'); // Remove default gallery styles add_filter('use_default_gallery_style', '__return_false'); // Infinite scroll add_theme_support('infinite-scroll', array('type' => 'scroll', 'container' => 'primary', 'wrapper' => false, 'footer' => false)); // Add Woocommerce support add_theme_support('woocommerce'); }
/** * Twenty Twelve setup. * * Sets up theme defaults and registers the various WordPress features that * Twenty Twelve supports. * * @uses load_theme_textdomain() For translation/localization support. * @uses add_editor_style() To add a Visual Editor stylesheet. * @uses add_theme_support() To add support for post thumbnails, automatic feed links, * custom background, and post formats. * @uses register_nav_menu() To add support for navigation menus. * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since Twenty Twelve 1.0 */ function twentytwelve_setup() { /* * Makes Twenty Twelve available for translation. * * Translations can be added to the /languages/ directory. * If you're building a theme based on Twenty Twelve, use a find and replace * to change 'twentytwelve' to the name of your theme in all the template files. */ load_theme_textdomain('twentytwelve', get_template_directory() . '/languages'); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // Adds RSS feed links to <head> for posts and comments. add_theme_support('automatic-feed-links'); // This theme supports a variety of post formats. add_theme_support('post-formats', array('aside', 'image', 'link', 'quote', 'status')); // This theme uses wp_nav_menu() in one location. register_nav_menu('primary', __('Primary Menu', 'twentytwelve')); /* * This theme supports custom background color and image, * and here we also set up the default background color. */ add_theme_support('custom-background', array('default-color' => 'e6e6e6')); // This theme uses a custom image size for featured images, displayed on "standard" posts. add_theme_support('post-thumbnails'); set_post_thumbnail_size(624, 9999); // Unlimited height, soft crop }
/** * Flexy setup. * * Sets up theme defaults and registers the various WordPress features that * Flexy supports. * * @uses load_theme_textdomain() For translation/localization support. * @uses add_editor_style() To add a Visual Editor stylesheet. * @uses add_theme_support() To add support for post thumbnails, automatic feed links, * custom background, and post formats. * @uses register_nav_menu() To add support for navigation menus. * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since Flexy 1.0 */ function flexy_setup() { add_theme_support('title-tag'); // Set up the content width value based on the theme's design and stylesheet. if (!isset($content_width)) { global $content_width; $content_width = 625; } /* * Makes Flexy available for translation. * * Translations can be added to the /languages/ directory. * If you're building a theme based on Flexy , use a find and replace * to change 'flexy' to the name of your theme in all the template files. */ load_theme_textdomain('flexy', get_template_directory() . '/languages'); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // Adds RSS feed links to <head> for posts and comments. add_theme_support('automatic-feed-links'); // This theme supports a variety of post formats. add_theme_support('post-formats', array('aside', 'image', 'link', 'quote', 'status')); // This theme uses wp_nav_menu() in one location. register_nav_menu('primary', __('Primary Menu', 'flexy')); /* * This theme supports custom background color and image, * and here we also set up the default background color. */ add_theme_support('custom-background', array('default-color' => 'e6e6e6')); // This theme uses a custom image size for featured images, displayed on "standard" posts. add_theme_support('post-thumbnails'); set_post_thumbnail_size(350, 350); // Unlimited height, soft crop }
/** * Setup Origami. * * @action after_setup_theme */ function origami_setup() { so_settings_init(); global $content_width; if (!isset($content_width)) { $content_width = 904; } // Load the text domains load_theme_textdomain('origami', get_template_directory() . '/languages'); add_theme_support('automatic-feed-links'); // Origami supports post formats add_theme_support('post-formats', array('gallery', 'image', 'video', 'aside', 'link', 'quote', 'status', 'chat')); // Origami supports post thumbnails add_theme_support('post-thumbnails'); // Create the primary menu area register_nav_menu('primary', 'Primary Menu'); // Add support for custom backgrounds. add_theme_support('custom-background', array('default-color' => 'f0eeeb', 'default-image' => get_template_directory_uri() . '/images/bg.png')); // Use custom headers for site logo add_theme_support('custom-header', array('flex-height' => true, 'flex-width' => true, 'header-text' => false)); add_editor_style(); // Set up the image sizes set_post_thumbnail_size(904, 400, true); add_image_size('post-thumbnail-mobile', 480, 420, true); add_image_size('post-thumbnail-full', 904, 904, false); add_image_size('origami-slider', 904, 500, true); }
function HuI_setup() { register_nav_menu('monkeyking', '主题菜单'); add_theme_support('post-thumbnails'); add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption')); add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat')); }
/** * Initial setup * * This function is attached to the 'after_setup_theme' action hook. * * @uses load_theme_textdomain() * @uses get_locale() * @uses BAVOTASAN_THEME_TEMPLATE * @uses add_theme_support() * @uses add_editor_style() * @uses add_custom_background() * @uses add_custom_image_header() * @uses register_default_headers() * * @since 1.0.0 */ function bavotasan_setup() { load_theme_textdomain('destin-basic', BAVOTASAN_THEME_TEMPLATE . '/library/languages'); // Add default posts and comments RSS feed links to <head>. add_theme_support('automatic-feed-links'); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style('library/css/admin/editor-style.css'); // This theme uses wp_nav_menu() in two location. register_nav_menu('primary', __('Primary Menu', 'destin-basic')); // Add support for a variety of post formats add_theme_support('post-formats', array('gallery', 'image', 'video', 'audio', 'quote', 'link', 'status', 'aside')); // This theme uses Featured Images (also known as post thumbnails) for archive pages add_theme_support('post-thumbnails'); add_image_size('home', 400, 800); add_image_size('featured-img', 840, 410, true); // Add support for custom backgrounds add_theme_support('custom-background', array('default-color' => '2f3238')); // Add HTML5 elements add_theme_support('html5', array('comment-list', 'comment-form')); // Add title tag support add_theme_support('title-tag'); // Infinite scroll add_theme_support('infinite-scroll', array('type' => 'scroll', 'wrapper' => false, 'footer' => false, 'footer_widgets' => 'extended-footer', 'render' => 'bavotasan_front_page_render')); // Remove default gallery styles add_filter('use_default_gallery_style', '__return_false'); // Add Woocommerce support add_theme_support('woocommerce'); }
function theme_setup() { //load_theme_textdomain( 'twentytwelve', get_template_directory() . '/languages' ); // This theme styles the visual editor with editor-style.css to match the theme style. //add_editor_style(); // Adds RSS feed links to <head> for posts and comments. //add_theme_support( 'automatic-feed-links' ); // This theme supports a variety of post formats. //add_theme_support( 'post-formats', array( 'aside', 'image', 'link', 'quote', 'status' ) ); register_nav_menu('region_menu', 'Меню регионов'); register_nav_menu('primary', 'Главное меню'); register_nav_menu('primary_sub', 'Главное меню (выпадающее)'); register_nav_menu('category_menu', 'Меню рубрик'); register_nav_menu('footer_menu', 'Подвал'); register_nav_menu('cinema_menu', 'Меню для кинотеатра'); register_nav_menu('mob_region_menu', 'Меню регионов (mobile)'); register_nav_menu('mob_primary', 'Главное меню (mobile)'); register_nav_menu('mob_footer_menu', 'Подвал (mobile)'); register_nav_menu('mob_footer_menu_login', 'Подвал (mobile-login)'); register_nav_menu('tab_region_menu', 'Меню регионов (tablet)'); register_nav_menu('tab_primary', 'Главное меню (tablet)'); register_nav_menu('tab_footer_menu', 'Подвал (tablet)'); add_theme_support('post-thumbnails'); /*add_image_size('r568x328', 568, 328, true); add_image_size('r160x96', 160, 96, true); add_image_size('r76x50', 76, 50, true); add_image_size('r224x160', 224, 160, true); add_image_size('r320x160', 320, 160, true);*/ //set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop }
function fukasawa_setup() { // Automatic feed add_theme_support('automatic-feed-links'); // Set content-width global $content_width; if (!isset($content_width)) { $content_width = 620; } // Post thumbnails add_theme_support('post-thumbnails'); set_post_thumbnail_size(88, 88, true); add_image_size('post-image', 973, 9999); add_image_size('post-thumb', 508, 9999); // Post formats add_theme_support('post-formats', array('gallery', 'image', 'video')); // Jetpack infinite scroll add_theme_support('infinite-scroll', array('type' => 'click', 'container' => 'posts', 'footer' => false)); // Title tag add_theme_support('title-tag'); // XTEC ************ AFEGIT - Allow custom background // 2016.11.14 @xaviernietosanchez add_theme_support('custom-background', array('default-color' => 'f2f2f2')); // ************ FI // Add nav menu register_nav_menu('primary', __('Primary Menu', 'fukasawa')); // Make the theme translation ready load_theme_textdomain('fukasawa', get_template_directory() . '/languages'); $locale = get_locale(); $locale_file = get_template_directory() . "/languages/{$locale}.php"; if (is_readable($locale_file)) { require_once $locale_file; } }
function mighty_theme_setup() { /* Register WP3+ menus */ register_nav_menu('header-menu', __('Header Menu', 'mighty')); register_nav_menu('footer-menu', __('Footer Menu', 'mighty')); /* Configure WP 2.9+ thumbnails */ add_theme_support('post-thumbnails'); add_image_size('s', 300, 300, true); add_image_size('m', 640, '', true); add_image_size('l', 980, '', true); update_option('thumbnail_size_w', 80); update_option('thumbnail_size_h', 80); update_option('thumbnail_crop', 1); // add_theme_support( // 'post-formats', // array( // 'gallery', // 'link', // 'quote', // 'video', // 'audio' // ) // ); add_theme_support('automatic-feed-links'); add_post_type_support('page', 'excerpt'); }
function cwp_setup() { global $content_width; if (!isset($content_width)) { $content_width = 625; } load_theme_textdomain('cwp', get_template_directory() . '/languages'); // Adds RSS feed links to <head> for posts and comments. add_theme_support('automatic-feed-links'); // This theme uses wp_nav_menu() in one location. register_nav_menu('primary', __('Primary Menu', 'cwp')); register_nav_menu('footer', __('Footer Menu', 'cwp')); /* * This theme supports custom background color and image, and here * we also set up the default background color. */ add_theme_support('custom-background', array('default-color' => 'e6e6e6')); // This theme uses a custom image size for featured images, displayed on "standard" posts. add_theme_support('post-thumbnails'); set_post_thumbnail_size(624, 9999); // Unlimited height, soft crop add_image_size('fo-thumb', 459, 158, true); add_image_size('fv-thumb', 180, 329, true); add_image_size('big-thumb', 300, 176, true); add_image_size('small-thumb', 134, 100, true); $args = array('width' => 960, 'height' => 60, 'default-image' => '', 'uploads' => true); add_theme_support('custom-header', $args); }
/** * Sets up theme defaults * * @uses add_editor_style() To add a Visual Editor stylesheet. * @uses add_theme_support() To add support for post thumbnails, automatic feed links, * custom background, and post formats. * @uses register_nav_menu() To add support for navigation menus. * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since CW 1.0 */ function cw_setup() { /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style(array('css/editor-style.css', 'fonts/genericons.css')); /* * Adds RSS feed links to <head> for posts and comments. */ add_theme_support('automatic-feed-links'); /* * Switches 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')); /* * This theme supports all available post formats by default. * See http://codex.wordpress.org/Post_Formats */ add_theme_support('post-formats', array('aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video')); /* * Create the main menu location. */ register_nav_menu('primary', __('Main Menu', 'cw')); /* * This theme uses a custom image size for featured images, displayed on "standard" posts. */ add_theme_support('post-thumbnails'); set_post_thumbnail_size(624, 9999); // Unlimited height, soft crop }
function trvlplnt_theme_setup() { /* Sets up the content width value based on the theme's design. */ if (!isset($content_width)) { $content_width = 580; } /* Makes Travel Planet available for translation. Translations can be added to the /languages/ directory. */ load_theme_textdomain('trvlplnt', get_template_directory() . '/languages'); /* Adds RSS feed links to <head> for posts and comments. */ add_theme_support('automatic-feed-links'); /* Add theme support for Featured Images */ add_theme_support('post-thumbnails'); /* Add theme support for Custom Header */ $header_args = array('default-image' => '', 'width' => 1920, 'height' => 160, 'flex-width' => false, 'flex-height' => false, 'random-default' => false, 'header-text' => true, 'default-text-color' => '343640', 'uploads' => true, 'admin-head-callback' => 'trvlplnt_admin_header_style', 'wp-head-callback' => 'trvlplnt_header_style'); add_theme_support('custom-header', $header_args); /* Add theme support for Custom Background */ $background_args = array('default-color' => 'f9f9f9', 'default-image' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => ''); add_theme_support('custom-background', $background_args); /* This theme supports all available post formats by default. See http://codex.wordpress.org/Post_Formats */ add_theme_support('post-formats', array('aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video')); /* Styles the visual editor with editor-style.css */ add_editor_style(); /* Travel Planet theme uses wp_nav_menu() in one location. */ register_nav_menu('primary', __('Navigation Menu', 'trvlplnt')); /* Set post image size */ if (function_exists('add_image_size')) { add_image_size('trvlplnt-image-size', 540, 400, true); } /* Change last argument to 'false' for off crop. */ }
function register_my_menu() { register_nav_menu('primary', 'Menú principal'); register_nav_menu('second', 'Menú footer primer'); register_nav_menu('third', 'Menú footer segundo'); register_nav_menu('fourth', 'Menú footer tercero'); }
function blackoot_setup() { /* Translation support * Translations can be added to the /languages directory. * A .pot template file is included to get you started */ load_theme_textdomain('blackoot-lite', get_template_directory() . '/languages'); // Content Width global $content_width; if (!isset($content_width)) { $content_width = 680; } /* Feed links support */ add_theme_support('automatic-feed-links'); /* Register menus */ register_nav_menu('primary', 'Navigation menu'); register_nav_menu('footer-menu', 'Footer menu'); /* Title tag support */ add_theme_support('title-tag'); /* Post Thumbnails Support */ add_theme_support('post-thumbnails'); set_post_thumbnail_size(680, 300, true); /* Custom header support */ add_theme_support('custom-header', array('header-text' => false, 'width' => 1000, 'height' => 364, 'flex-height' => true)); /* Custom background support */ add_theme_support('custom-background', array('default-color' => '111111', 'default-image' => get_template_directory_uri() . '/img/zwartevilt.png')); }
function nimbus_setup() { // Localization $lang_local = get_template_directory() . '/lang'; load_theme_textdomain('nimbus', $lang_local); // Register Thumbnail Sizes add_theme_support('post-thumbnails'); set_post_thumbnail_size(1160, 9999, true); add_image_size('nimbus-small', 140, 90, true); add_image_size('nimbus-feature', 370, 191, true); add_image_size('nimbus-post', 760, 227, true); add_image_size('nimbus-post-full', 1160, 221, true); add_image_size('full-banner', 1160, 360, true); add_image_size('half-banner', 660, 360, true); add_image_size('half-image', 670, 424, true); add_image_size('full-image', 1170, 424, true); // Load feed links add_theme_support('automatic-feed-links'); // Support Custom Background $nimbus_custom_background_defaults = array('default-color' => 'ffffff'); add_theme_support('custom-background', $nimbus_custom_background_defaults); // Set Content Width global $content_width; if (!isset($content_width)) { $content_width = 770; } // Register Menus register_nav_menu('primary', __('Primary Menu', 'nimbus')); register_nav_menu('mobile', __('Mobile Menu', 'nimbus')); }
/** * Initial setup for Magazine Basic theme * * This function is attached to the 'after_setup_theme' action hook. * * @uses load_theme_textdomain() * @uses get_locale() * @uses add_theme_support() * @uses add_editor_style() * @uses register_default_headers() * * @since 3.0.0 */ function bavotasan_setup() { $bavotasan_theme_options = bavotasan_theme_options(); load_theme_textdomain('magazine-basic', BAVOTASAN_THEME_TEMPLATE . '/library/languages'); // Add default posts and comments RSS feed links to <head>. add_theme_support('automatic-feed-links'); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(array('library/css/admin/editor-style.css', bavotasan_font_url())); // This theme uses wp_nav_menu() in two locations. register_nav_menu('primary', __('Primary Menu', 'magazine-basic')); register_nav_menu('secondary', __('Secondary Menu', 'magazine-basic')); // Add support for a variety of post formats add_theme_support('post-formats', array('gallery', 'image', 'video', 'audio', 'quote', 'link', 'status', 'aside')); // This theme uses Featured Images (also known as post thumbnails) for archive pages add_theme_support('post-thumbnails'); add_image_size('1_column', $bavotasan_theme_options['1_image_width'], 999); add_image_size('2_column', $bavotasan_theme_options['2_image_width'], 999); add_image_size('3_column', $bavotasan_theme_options['3_image_width'], 999); // Add a filter to bavotasan_header_image_width and bavotasan_header_image_height to change the width and height of your custom header. add_theme_support('custom-header', array('random-default' => true, 'default-text-color' => '333', 'flex-width' => true, 'flex-height' => true, 'width' => apply_filters('bavotasan_header_image_width', 1200), 'height' => apply_filters('bavotasan_header_image_height', 288), 'admin-head-callback' => 'bavotasan_admin_header_style', 'admin-preview-callback' => 'bavotasan_admin_header_image')); add_theme_support('custom-background', array('default-image' => BAVOTASAN_THEME_URL . '/library/images/solid.png')); // Add HTML5 elements add_theme_support('html5', array('comment-list', 'search-form', 'comment-form')); // Add title tag support add_theme_support('title-tag'); // Remove default gallery styles add_filter('use_default_gallery_style', '__return_false'); }
public function register() { add_action('after_setup_theme', function () { register_nav_menu($this->location, __($this->description, 'bush')); }); return $this; }
function salejunction_setup() { global $wpdb; add_theme_support('automatic-feed-links'); add_theme_support('post-thumbnails'); add_image_size('index-categories', 200, 150, true); add_image_size('page-single', 600, 600, true); add_editor_style(); register_nav_menu('custom_menu', MAIN_MENU); //Load languages file load_theme_textdomain('salejunction', get_template_directory() . '/languages'); $locale = get_locale(); $locale_file = get_template_directory() . "/languages/{$locale}.php"; if (is_readable($locale_file)) { require_once $locale_file; } /** * Set the content width based on the theme's design and stylesheet. * * Used to set the width of images and content. Should be equal to the width the theme * is designed for, generally via the style.css stylesheet. */ global $content_width; if (!isset($content_width)) { $content_width = 590; } }
/** * Sets 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. * * To override foghorn_setup() in a child theme, add your own foghorn_setup to your child theme's * functions.php file. * * @uses load_theme_textdomain() For translation/localization support. * @uses add_editor_style() To style the visual editor. * @uses add_theme_support() To add support for post thumbnails and automatic feed links. * @uses register_nav_menus() To add support for navigation menus. * @uses add_custom_background() To add support for a custom background. * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since Foghorn 0.1 */ function foghorn_setup() { /** * Set the content width based on the theme's design and stylesheet. */ if (!isset($content_width)) { $content_width = 560; } // Make Foghorn translatable load_theme_textdomain('foghorn', TEMPLATEPATH . '/languages'); $locale = get_locale(); $locale_file = TEMPLATEPATH . "/languages/{$locale}.php"; if (is_readable($locale_file)) { require_once $locale_file; } // Styles the visual editor with editor-style.css to match the theme style add_editor_style(); // Add default posts and comments RSS feed links to <head>. add_theme_support('automatic-feed-links'); // This theme uses wp_nav_menu() in one location. register_nav_menu('primary', __('Primary Menu', 'foghorn')); // Adds support for custom backgrounds add_custom_background(); // Adds theme support for thumbnails add_theme_support('post-thumbnails'); // Creates an image thumbnail size for multiple displays add_image_size('multiple-thumb', 325, 205, true); // Sets up the option panel functions require_once TEMPLATEPATH . '/extensions/options-functions.php'; }
function sincere_theme_setup() { // Adds theme support for menus on the back-end add_theme_support('menus'); register_nav_menu('primary', 'Primary Navigation Menu'); register_nav_menu('footer', 'Footer Links'); }
/** * Add WP Theme Menu Support **/ function espiral_theme_support() { add_theme_support("menus"); register_nav_menu("primary", "Header Navigation"); register_nav_menu("secondary", "Footer Navigation"); add_theme_support('post-thumbnails'); }
function weblizar_head_setup() { global $content_width; //content width if (!isset($content_width)) { $content_width = 550; } //px //Blog Thumb Image Sizes add_image_size('home_post_thumb', 340, 210, true); //Blogs thumbs add_image_size('wl_page_thumb', 730, 350, true); add_image_size('blog_2c_thumb', 570, 350, true); add_theme_support('title-tag'); // Load text domain for translation-ready load_theme_textdomain('weblizar', WL_TEMPLATE_DIR_CORE . '/lang'); add_theme_support('post-thumbnails'); //supports featured image // This theme uses wp_nav_menu() in one location. register_nav_menu('primary', __('Primary Menu', 'weblizar')); // theme support $args = array('default-color' => '000000'); add_theme_support('custom-background', $args); add_theme_support('automatic-feed-links'); require WL_TEMPLATE_DIR . '/options-reset.php'; //Reset Theme Options Here }
/** * Sets up theme defaults and registers support for various WordPress features. */ function minileven_setup() { global $wp_version; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates */ require get_template_directory() . '/inc/tweaks.php'; /* Make Minileven available for translation. * Translations can be added to the /languages/ directory. * If you're building a theme based on Minileven, use a find and replace * to change 'minileven' to the name of your theme in all the template files. */ load_theme_textdomain('minileven', TEMPLATEPATH . '/languages'); // Add default posts and comments RSS feed links to <head>. add_theme_support('automatic-feed-links'); // This theme uses wp_nav_menu() in one location. register_nav_menu('primary', __('Primary Menu', 'jetpack')); // Add support for a variety of post formats add_theme_support('post-formats', array('gallery')); // Add support for custom backgrounds if (version_compare($wp_version, '3.4', '>=')) { add_theme_support('custom-background'); } else { add_custom_background(); } // Add support for post thumbnails add_theme_support('post-thumbnails'); }
function nimbus_setup() { // Localization $lang_local = get_template_directory() . '/lang'; load_theme_textdomain('nimbus', $lang_local); // Register Thumbnail Sizes add_theme_support('post-thumbnails'); set_post_thumbnail_size(1170, 9999, true); add_image_size('nimbus_270_170', 270, 170, true); add_image_size('nimbus_740_420', 740, 420, true); add_image_size('nimbus_105_90', 105, 90, true); add_image_size('nimbus_1140_420', 1140, 420, true); add_image_size('nimbus_1130_410', 1130, 410, true); // Load feed links add_theme_support('automatic-feed-links'); // Support Custom Background $nimbus_custom_background_defaults = array('default-color' => 'ffffff'); add_theme_support('custom-background', $nimbus_custom_background_defaults); // Set Content Width global $content_width; if (!isset($content_width)) { $content_width = 720; } // Register Menus register_nav_menu('primary', __('Primary Menu', 'nimbus')); }
function register_custom_menus() { /* * Place here all your register_nav_menu() calls. */ register_nav_menu('main_menu', 'Header Menu'); }
/** * Initial setup * * This function is attached to the 'after_setup_theme' action hook. * * @uses load_theme_textdomain() * @uses get_locale() * @uses BAVOTASAN_THEME_TEMPLATE * @uses add_theme_support() * @uses add_editor_style() * @uses add_custom_background() * @uses add_custom_image_header() * @uses register_default_headers() * * @since 1.0.0 */ function bavotasan_setup() { load_theme_textdomain('tienda', BAVOTASAN_THEME_TEMPLATE . '/library/languages'); // Add default posts and comments RSS feed links to <head>. add_theme_support('automatic-feed-links'); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style('library/css/admin/editor-style.css'); // This theme uses wp_nav_menu() in three location. register_nav_menu('primary', __('Primary Menu', 'tienda')); register_nav_menu('top', __('Top Menu', 'tienda')); // Add support for a variety of post formats add_theme_support('post-formats', array('gallery', 'image', 'video', 'audio', 'quote', 'link', 'status', 'aside')); // This theme uses Featured Images (also known as post thumbnails) for archive pages add_theme_support('post-thumbnails', array('post', 'product')); add_image_size('featured-img', 840, 410, true); // Add a filter to bavotasan_header_image_width and bavotasan_header_image_height to change the width and height of your custom header. add_theme_support('custom-header', array('header-text' => false, 'flex-height' => true, 'flex-width' => true, 'random-default' => true, 'width' => apply_filters('bavotasan_header_image_width', 1800), 'height' => apply_filters('bavotasan_header_image_height', 600))); // Add support for custom backgrounds add_theme_support('custom-background', array('default-color' => 'ffffff')); // Add HTML5 elements add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption')); // Add title tag support add_theme_support('title-tag'); // Remove default gallery styles add_filter('use_default_gallery_style', '__return_false'); // Add Woocommerce support add_theme_support('woocommerce'); }
function renova_setup() { //Feed links add_theme_support('automatic-feed-links'); //Nav menu register_nav_menu('primary', __('Primary Menu', 'renovalang')); //Sidebar $args = array('name' => __('renova_side', 'renovalang'), 'id' => 'renova01', 'description' => '', 'class' => '', 'before_widget' => '<section id="%1$s" class="blog-side-panel %2$s">', 'after_widget' => '</section>', 'before_title' => '<h2>', 'after_title' => '</h2>'); register_sidebar($args); //Content width if (!isset($content_width)) { $content_width = 900; } //Initiate custom post types add_action('init', 'renova_post_types'); add_action('init', 'renova_post_gallery'); //Load the text domain load_theme_textdomain('renovalang', get_template_directory() . '/languages'); //Post Thumbnails add_theme_support('post-thumbnails', array('portfolio_item', 'gallery_item', 'post')); //Post formats add_theme_support('post-formats', array('image', 'audio', 'link', 'quote', 'video')); set_post_thumbnail_size(300, 300, true); // Standard Size Thumbnails //Function to crop all thumbnails if (false === get_option("thumbnail_crop")) { add_option("thumbnail_crop", "1"); } else { update_option("thumbnail_crop", "1"); } }
/** * Sets up theme defaults and registers the various WordPress features that * Openstrap supports. * * @uses load_theme_textdomain() For translation/localization support. * @uses add_editor_style() To add a Visual Editor stylesheet. * @uses add_theme_support() To add support for post thumbnails, automatic feed links, * custom background, and post formats. * @uses register_nav_menu() To add support for navigation menus. * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * * @since Openstrap 0.1 */ function openstrap_setup() { // Load up our theme options page and related code. Options Framework require_once get_template_directory() . '/inc/options-panel.php'; /* * Makes Openstrap available for translation. * * Translations can be added to the /languages/ directory. * If you're building a theme based on Openstrap, use a find and replace * to change 'openstrap' to the name of your theme in all the template files. */ load_theme_textdomain('openstrap', get_template_directory() . '/languages'); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // Adds RSS feed links to <head> for posts and comments. add_theme_support('automatic-feed-links'); // This theme supports a variety of post formats. add_theme_support('post-formats', array('aside', 'image', 'link', 'quote', 'status')); // This theme uses wp_nav_menu() in one location. register_nav_menu('primary', __('Primary Menu', 'openstrap')); register_nav_menu('secondary', __('Secondary Menu', 'openstrap')); register_nav_menu('footer-menu', __('Footer Menu', 'openstrap')); /* * This theme supports custom background color and image, and here * we also set up the default background color. */ add_theme_support('custom-background', array('default-color' => 'e6e6e6')); // This theme uses a custom image size for featured images, displayed on "standard" posts. add_theme_support('post-thumbnails'); set_post_thumbnail_size(624, 9999); // Unlimited height, soft crop }