Example #1
0
 /**
  * Sets up theme defaults and registers support for various WordPress and BuddyPress 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 bp_dtheme_setup() in a child theme, add your own bp_dtheme_setup to your child theme's
  * functions.php file.
  *
  * @global BuddyPress $bp The one true BuddyPress instance
  * @since BuddyPress (1.5)
  */
 function bp_dtheme_setup()
 {
     // Load the AJAX functions for the theme
     require get_template_directory() . '/_inc/ajax.php';
     // This theme styles the visual editor with editor-style.css to match the theme style.
     add_editor_style();
     // This theme comes with all the BuddyPress goodies
     add_theme_support('buddypress');
     // This theme uses post thumbnails
     add_theme_support('post-thumbnails');
     // Add default posts and comments RSS feed links to head
     add_theme_support('automatic-feed-links');
     // Add responsive layout support to bp-default without forcing child
     // themes to inherit it if they don't want to
     add_theme_support('bp-default-responsive');
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => __('Primary Navigation', 'buddypress')));
     // This theme allows users to set a custom background
     $custom_background_args = array('wp-head-callback' => 'bp_dtheme_custom_background_style');
     add_theme_support('custom-background', $custom_background_args);
     // Add custom header support if allowed
     if (!defined('BP_DTHEME_DISABLE_CUSTOM_HEADER')) {
         define('HEADER_TEXTCOLOR', 'FFFFFF');
         // The height and width of your custom header. You can hook into the theme's own filters to change these values.
         // Add a filter to bp_dtheme_header_image_width and bp_dtheme_header_image_height to change these values.
         define('HEADER_IMAGE_WIDTH', apply_filters('bp_dtheme_header_image_width', 1250));
         define('HEADER_IMAGE_HEIGHT', apply_filters('bp_dtheme_header_image_height', 133));
         // We'll be using post thumbnails for custom header images on posts and pages. We want them to be 1250 pixels wide by 133 pixels tall.
         // Larger images will be auto-cropped to fit, smaller ones will be ignored.
         set_post_thumbnail_size(HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true);
         // Add a way for the custom header to be styled in the admin panel that controls custom headers.
         $custom_header_args = array('wp-head-callback' => 'bp_dtheme_header_style', 'admin-head-callback' => 'bp_dtheme_admin_header_style');
         add_theme_support('custom-header', $custom_header_args);
     }
     if (!is_admin() || defined('DOING_AJAX') && DOING_AJAX) {
         // Register buttons for the relevant component templates
         // Friends button
         if (bp_is_active('friends')) {
             add_action('bp_member_header_actions', 'bp_add_friend_button', 5);
         }
         // Activity button
         if (bp_is_active('activity') && bp_activity_do_mentions()) {
             add_action('bp_member_header_actions', 'bp_send_public_message_button', 20);
         }
         // Messages button
         if (bp_is_active('messages')) {
             add_action('bp_member_header_actions', 'bp_send_private_message_button', 20);
         }
         // Group buttons
         if (bp_is_active('groups')) {
             add_action('bp_group_header_actions', 'bp_group_join_button', 5);
             add_action('bp_group_header_actions', 'bp_group_new_topic_button', 20);
             add_action('bp_directory_groups_actions', 'bp_group_join_button');
         }
         // Blog button
         if (bp_is_active('blogs')) {
             add_action('bp_directory_blogs_actions', 'bp_blogs_visit_blog_button');
         }
     }
 }
function beccamakesatheme_setup()
{
    // Post thumbnails support
    add_theme_support('post-thumbnails');
    // Register Menus
    register_nav_menus(array('primary-menu' => __('Primary Menu', 'beccamakesatheme'), 'secondary' => __('Secondary Menu', 'beccamakesatheme')));
}
Example #3
0
 /**
  * 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 for post thumbnails.
  */
 function activello_setup()
 {
     /*
      * Make theme available for translation.
      * Translations can be filed in the /languages/ directory.
      */
     load_theme_textdomain('activello', get_template_directory() . '/languages');
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     /**
      * Enable support for Post Thumbnails on posts and pages.
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
      */
     add_theme_support('post-thumbnails');
     add_image_size('activello-featured', 1170, 550, true);
     add_image_size('activello-slider', 1920, 550, true);
     add_image_size('activello-thumbnail', 330, 220, true);
     add_image_size('activello-medium', 640, 480, true);
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => esc_html__('Primary Menu', 'activello')));
     // Enable support for Post Formats.
     add_theme_support('post-formats', array('video', 'audio'));
     // Setup the WordPress core custom background feature.
     add_theme_support('custom-background', apply_filters('activello_custom_background_args', array('default-color' => 'FFFFFF', 'default-image' => '')));
     // Enable support for HTML5 markup.
     add_theme_support('html5', array('comment-list', 'search-form', 'comment-form', 'gallery', 'caption'));
     /*
      * Let WordPress manage the document title.
      * By adding theme support, we declare that this theme does not use a
      * hard-coded <title> tag in the document head, and expect WordPress to
      * provide it for us.
      */
     add_theme_support('title-tag');
 }
Example #4
0
function reciprocal_essential_functions()
{
    // for dynamic title
    add_theme_support('title-tag');
    // for customize Header Image
    $els_header_img = array('default-image' => get_template_directory_uri() . '/images/custom-header-bg.jpg');
    add_theme_support('custom-header', $els_header_img);
    //---------------------------
    // for customize background color
    add_theme_support('custom-background');
    //---------------------------
    // for add featured image
    add_theme_support('post-thumbnails');
    //---------------------------
    // theme textdomain
    load_theme_textdomain('reciprocal', get_template_directory_uri() . '/languages');
    //---------------------------
    // for menu register--------
    if (function_exists('register_nav_menus')) {
        register_nav_menus(array('prodhanmenu' => __('Main Menu', 'reciprocal'), 'nichermenu' => __('Footer Menu', 'reciprocal')));
    }
    //---------------------------
    function short_description($limit)
    {
        $content = explode(' ', get_the_content());
        $less_content = array_slice($content, 0, $limit);
        echo implode(' ', $less_content);
    }
}
Example #5
0
 /**
  * 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 reddle_setup() in a child theme, add your own reddle_setup to your child theme's
  * functions.php file.
  */
 function reddle_setup()
 {
     /**
      * Make theme available for translation
      * Translations can be filed in the /languages/ directory
      * If you're building a theme based on Reddle, use a find and replace
      * to change 'reddle' to the name of your theme in all the template files
      */
     load_theme_textdomain('reddle', get_template_directory() . '/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_menus(array('primary' => __('Primary Menu', 'reddle')));
     /**
      * Add support for the Aside and Gallery Post Formats
      */
     add_theme_support('post-formats', array('aside', 'image'));
     /**
      * Add in support for post thumbnails
      */
     add_theme_support('post-thumbnails');
     /**
      * Add support for custom backgrounds
      */
     add_theme_support('custom-background');
 }
Example #6
0
 /**
  * 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 for post thumbnails.
  */
 function eryn_setup()
 {
     /*
      * Make theme available for translation.
      * Translations can be filed in the /languages/ directory.
      * If you're building a theme based on eryn, use a find and replace
      * to change 'eryn' to the name of your theme in all the template files
      */
     load_theme_textdomain('eryn', get_template_directory() . '/languages');
     // Feed Links
     add_theme_support('automatic-feed-links');
     // Post formats
     add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link', 'gallery'));
     // Post thumbnails
     add_theme_support('post-thumbnails');
     add_image_size('full-thumb', 940, 0, true);
     add_image_size('slider-thumb', 650, 440, true);
     add_image_size('thumb', 440, 294, true);
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => __('Primary Menu', 'eryn')));
     /*
      * 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'));
     // Display Title in theme
     add_theme_support('title-tag');
     // Custom Backgrounds Support
     $args = array('default-color' => 'FFFFFF');
     add_theme_support('custom-background', $args);
     // link a custom stylesheet file to the TinyMCE visual editor
     $font_url = str_replace(',', '%2C', '//fonts.googleapis.com/css?family=Droid+Serif');
     add_editor_style(array('style.css', 'css/editor-style.css', $font_url));
 }
Example #7
0
 /**
  * Set up theme defaults and register 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.
  */
 function _tk_setup()
 {
     global $cap, $content_width;
     // This theme 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');
     /**
      * Enable support for Post Thumbnails on posts and pages
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
      */
     add_theme_support('post-thumbnails');
     /**
      * Enable support for Post Formats
      */
     add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link'));
     /**
      * Setup the WordPress core custom background feature.
      */
     add_theme_support('custom-background', apply_filters('_tk_custom_background_args', array('default-color' => 'ffffff', 'default-image' => '')));
     /**
      * Make theme available for translation
      * Translations can be filed in the /languages/ directory
      * If you're building a theme based on _tk, use a find and replace
      * to change '_tk' to the name of your theme in all the template files
      */
     load_theme_textdomain('_tk', get_template_directory() . '/languages');
     /**
      * This theme uses wp_nav_menu() in one location.
      */
     register_nav_menus(array('primary' => __('Header bottom menu', '_tk')));
 }
Example #8
0
 function bones_setup()
 {
     $options = get_option('bones_theme_options');
     // This theme uses post thumbnails
     add_theme_support('post-thumbnails');
     // 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_menus(array('primary' => __('Primary Navigation', 'bones')));
     // This theme allows users to set a custom background
     // TODO: Add option to implement add_custom_background();
     if ($options['header_type'] == 'image') {
         // Your changeable header business starts here
         define('HEADER_TEXTCOLOR', '');
         // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI.
         define('HEADER_IMAGE', '%s/images/headers/path.jpg');
         // The height and width of your custom header. You can hook into the theme's own filters to change these values.
         // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values.
         define('HEADER_IMAGE_WIDTH', apply_filters('bones_header_image_width', $options['header_width']));
         define('HEADER_IMAGE_HEIGHT', apply_filters('bones_header_image_height', $options['header_height']));
         // Don't support text inside the header image.
         define('NO_HEADER_TEXT', true);
         // Add a way for the custom header to be styled in the admin panel that controls
         // custom headers. See twentyten_admin_header_style(), below.
         add_custom_image_header('', 'bones_admin_header_style');
         // ... and thus ends the changeable header business.
     }
 }
Example #9
0
 function avenue_setup()
 {
     if (!isset($content_width)) {
         global $content_width;
         $content_width = 1060;
     }
     define('SC_BYBLOS_VERSION', '2.0');
     load_theme_textdomain('avenue', get_template_directory() . '/languages');
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     add_theme_support('post-thumbnails');
     /*
      * Enable support for Post Thumbnails on posts and pages.
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
      */
     register_nav_menus(array('primary' => __('Primary Menu', 'avenue')));
     // Enable support for Post Formats.
     add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link'));
     // Setup the WordPress core custom background feature.
     add_theme_support('custom-background', apply_filters('avenue_custom_background_args', array('default-color' => 'ffffff', 'default-image' => '')));
     // Enable support for HTML5 markup.
     add_theme_support('html5', array('comment-list', 'search-form', 'comment-form', 'gallery', 'caption'));
     add_filter('widget_text', 'do_shortcode');
 }
Example #10
0
 function lwfitness_setup()
 {
     /*
      * Make theme available for translation.
      * Translations can be filed in the /languages/ directory.
      */
     load_theme_textdomain('lwfitness', get_template_directory() . '/languages');
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     /*
      * Let WordPress manage the document title.
      */
     add_theme_support('title-tag');
     /*
      * Enable support for Post Thumbnails on posts and pages.
      */
     add_theme_support('post-thumbnails');
     set_post_thumbnail_size(825, 510, true);
     // Add menus.
     register_nav_menus(array('primary' => __('Primary Menu', 'lwfitness'), 'social' => __('Social Links Menu', 'lwfitness')));
     /*
      * 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.
      */
     add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'));
 }
Example #11
0
 /**
  * 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 for post thumbnails.
  */
 function ta_music_setup()
 {
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     /*
      * Let WordPress manage the document title.
      * By adding theme support, we declare that this theme does not use a
      * hard-coded <title> tag in the document head, and expect WordPress to
      * provide it for us.
      */
     add_theme_support('title-tag');
     /*
      * Enable support for Post Thumbnails on posts and pages.
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
      */
     add_theme_support('post-thumbnails');
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => __('Primary Menu', 'ta-music')));
     /*
      * 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('gallery', 'audio', 'video'));
     // Set up the WordPress core custom background feature.
     add_theme_support('custom-background', apply_filters('ta_music_custom_background_args', array('default-color' => 'ffffff', 'default-image' => '')));
 }
Example #12
0
 /**
  * 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 for post thumbnails.
  *
  * @since Starter Theme 1.0f
  */
 function startertheme_setup()
 {
     /* Let WordPress manage the document title.
      * By adding theme support, we declare that this theme does not use a
      * hard-coded <title> tag in the document head, and expect WordPress to
      * provide it for us.
      */
     add_theme_support('title-tag');
     /*
      * Enable support for Post Thumbnails on posts and pages.
      *
      */
     add_theme_support('post-thumbnails');
     set_post_thumbnail_size(825, 510, true);
     /**
      * Register WP Nav Menu
      * This theme uses wp_nav_menu() in two locations.
      */
     /**
      * 
      */
     register_nav_menus(array('main_menu' => __('Main Menu', 'startertheme'), 'footer_menu' => __('Footer Menu', 'startertheme')));
     /*
      * 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'));
 }
Example #13
0
 /**
  * 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 for post thumbnails.
  */
 function dazzling_setup()
 {
     /*
      * Make theme available for translation.
      * Translations can be filed in the /languages/ directory.
      * If you're building a theme based on Dazzling, use a find and replace
      * to change 'dazzling' to the name of your theme in all the template files
      */
     load_theme_textdomain('dazzling', get_template_directory() . '/languages');
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     /*
      * Enable support for Post Thumbnails on posts and pages.
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
      */
     add_theme_support('post-thumbnails');
     add_image_size('dazzling-featured', 730, 410, true);
     add_image_size('tab-small', 60, 60, true);
     // Small Thumbnail
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => __('Primary Menu', 'dazzling'), 'footer-links' => __('Footer Links', 'dazzling')));
     // Enable support for Post Formats.
     add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link'));
     // Setup the WordPress core custom background feature.
     add_theme_support('custom-background', apply_filters('dazzling_custom_background_args', array('default-color' => 'ffffff', 'default-image' => '')));
     /*
      * Let WordPress manage the document title.
      * By adding theme support, we declare that this theme does not use a
      * hard-coded <title> tag in the document head, and expect WordPress to
      * provide it for us.
      */
     add_theme_support('title-tag');
 }
Example #14
0
function iamsocial_setup()
{
    add_theme_support('post-thumbnails');
    add_theme_support('automatic-feed-links');
    add_theme_support('title-tag');
    register_nav_menus(array('primary' => __('Primary Menu', 'iamsocial'), 'footer-menu-left' => __('Footer Menu Left', 'iamsocial'), 'footer-menu-right' => __('Footer Menu Right', 'iamsocial'), 'footer-menu-middle' => __('Footer Menu Center', 'iamsocial')));
}
Example #15
0
/**
*
* THEME SETUP
*
**/
function SkeletonTube_Setup()
{
    /**
     *
     * Navigation Menu
     *
     **/
    register_nav_menus(array('primary' => __('Primary Menu'), 'footer' => __('Footer Menu')));
    /**
     *
     * Add featured image support
     *
     **/
    add_theme_support('post-thumbnails');
    add_image_size('banner-image', 950, 350, true);
    /**
     *
     * Search Form
     *
     **/
    add_theme_support('html5', array('search-form'));
    /**
     *
     * Add Post Format Support
     *
     **/
    add_theme_support('post-formats', array('aside', 'gallery', 'link'));
}
Example #16
0
 function portfilo_portfolio_theme_setup()
 {
     add_theme_support('title-tag');
     add_theme_support('custom-background');
     $args = array('flex-width' => true, 'width' => 1400, 'flex-height' => true, 'height' => 600, 'default-image' => get_template_directory_uri() . '/images/overlay.jpg');
     add_theme_support('custom-header', $args);
     /* ---------------------------------------------------------------------------
      * Loads Theme Textdomain
      * --------------------------------------------------------------------------- */
     load_theme_textdomain('portfilo', PORTFILO_LANG_DIR);
     add_theme_support('automatic-feed-links');
     add_theme_support('woocommerce');
     add_theme_support('post-thumbnails');
     set_post_thumbnail_size(260, 146, false);
     // admin - featured image
     add_image_size('portfilo_50x50', 50, 50, false);
     // admin - lists
     add_image_size('portfilo-aboutus-thumbnail', 1140, 640, true);
     add_image_size('portfilo-blog-listing-thumbnail', 458, 244, true);
     add_image_size('portfilo-blog-detail-thumbnail', 750, 400, true);
     add_image_size('portfilo-slider-thumbnail', 1400, 786, true);
     /* ---------------------------------------------------------------------------
      * Registers a menu location to use with navigation menus.
      * --------------------------------------------------------------------------- */
     /*register_nav_menu('primary', __('Main menu', 'portfilo'));
       register_nav_menu('footer', __('Footer menu', 'portfilo'));*/
     register_nav_menus(array('primary' => __('Primary Navigation', 'portfilo'), 'secondary' => __('Secondary Navigation', 'portfilo')));
     add_action('add_meta_boxes', 'portfilo_Slider');
     add_action('save_post', 'PortfiloSaveHomePageSlider');
 }
Example #17
0
 static function setup()
 {
     load_theme_textdomain('basics', get_template_directory() . '/lang');
     add_theme_support('post-thumbnails');
     add_theme_support('menus');
     register_nav_menus(array('primary_navigation' => __('Primary Navigation', 'basics'), 'utility_navigation' => __('Utility Navigation', 'basics')));
 }
Example #18
0
 /**
  * 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 toolbox_setup() in a child theme, add your own toolbox_setup to your child theme's
  * functions.php file.
  */
 function toolbox_setup()
 {
     /**
      * Make theme available for translation
      * Translations can be filed in the /languages/ directory
      * If you're building a theme based on toolbox, use a find and replace
      * to change 'toolbox' to the name of your theme in all the template files
      */
     load_theme_textdomain('toolbox', get_template_directory() . '/languages');
     $locale = get_locale();
     $locale_file = get_template_directory() . "/languages/{$locale}.php";
     if (is_readable($locale_file)) {
         require_once $locale_file;
     }
     /**
      * 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_menus(array('primary' => __('Primary Menu', 'toolbox')));
     /**
      * Add support for the Aside and Gallery Post Formats
      */
     add_theme_support('post-formats', array('aside', 'image', 'gallery'));
 }
 /**
  * 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 for post thumbnails.
  */
 function _act_setup()
 {
     load_theme_textdomain('_s', get_template_directory() . '/languages');
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     add_theme_support('title-tag');
     /*
      * Enable support for Post Thumbnails on posts and pages.
      *
      * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
      */
     add_theme_support('post-thumbnails');
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => esc_html__('Primary', '_act'), 'hero' => esc_html__('Hero', '_act')));
     /*
      * 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 https://developer.wordpress.org/themes/functionality/post-formats/
      */
     add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link'));
     // Set up the WordPress core custom background feature.
     add_theme_support('custom-background', apply_filters('_act_custom_background_args', array('default-color' => 'ffffff', 'default-image' => '')));
     add_image_size('feature500', 500, 500, true);
 }
function skillcrushstarter_setup()
{
    // Post thumbnails support
    add_theme_support('post-thumbnails');
    // Register Menus
    register_nav_menus(array('primary-menu' => __('Primary Menu', 'skillcrushstarter'), 'secondary' => __('Secondary Menu', 'skillcrushstarter')));
}
Example #21
0
/**
 * Theme setup
 */
function setup()
{
    // Make theme available for translation
    // Community translations can be found at https://github.com/roots/rubi-translations
    load_theme_textdomain('rubi', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(['primary_navigation' => __('Primary Navigation', 'rubi')]);
    // Add post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    // Add post formats
    // http://codex.wordpress.org/Post_Formats
    add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
    // Add HTML5 markup for captions
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', ['caption', 'comment-form', 'comment-list']);
    // Tell the TinyMCE editor to use a custom stylesheet
    add_editor_style(Assets\asset_path('styles/editor-style.css'));
}
Example #22
0
 /**
  * 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 for post thumbnails.
  */
 function cartel_setup()
 {
     /*
      * Make theme available for translation.
      * Translations can be filed in the /languages/ directory.
      * If you're building a theme based on Cartel, use a find and replace
      * to change 'cartel' to the name of your theme in all the template files
      */
     load_theme_textdomain('cartel', get_template_directory() . '/languages');
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     /*
      * Enable support for Post Thumbnails on posts and pages.
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
      */
     add_theme_support('post-thumbnails');
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => __('Primary Menu', 'cartel')));
     // Enable support for Post Formats.
     //add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
     // Setup the WordPress core custom background feature.
     /*
     	add_theme_support( 'custom-background', apply_filters( 'cartel_custom_background_args', array(
     		'default-color' => 'ffffff',
     		'default-image' => '',
     	) ) );
     */
     // Enable support for HTML5 markup.
     add_theme_support('html5', array('comment-list', 'search-form', 'comment-form', 'gallery', 'caption'));
 }
Example #23
0
 /**
  * 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 for post thumbnails.
  */
 function actions_setup()
 {
     /*
      * Make theme available for translation.
      * Translations can be filed in the /languages/ directory.
      * If you're building a theme based on actions, use a find and replace
      * to change 'actions' to the name of your theme in all the template files.
      */
     load_theme_textdomain('actions');
     /**
      * Add default posts and comments RSS feed links to head.
      */
     add_theme_support('automatic-feed-links');
     add_theme_support('customize-selective-refresh-widgets');
     /*
      * Enable support for Post Thumbnails on posts and pages.
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
      */
     add_theme_support('post-thumbnails');
     set_post_thumbnail_size(640, 300);
     // This theme uses wp_nav_menu() in one locations.
     register_nav_menus(array('primary' => esc_html__('Primary Menu', 'actions')));
     /*
      * Switch default core markup for search form, comment form, comments, galleries, captions and widgets
      * to output valid HTML5.
      */
     add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'widgets'));
     /*
      * Enable support for site logo.
      */
     add_theme_support('custom-logo', array('height' => 150, 'width' => 250, 'flex-height' => true, 'header-text' => array('site-title', 'site-description')));
     // Declare support for title theme feature
     add_theme_support('title-tag');
 }
 function az_theme_setup()
 {
     global $options_alice;
     // Load Translation Domain
     load_theme_textdomain(AZ_THEME_NAME, get_template_directory() . '/languages');
     // Register Menus
     register_nav_menus(array('primary_menu' => __('Primary Menu', AZ_THEME_NAME)));
     // Add RSS Feed links to HTML
     add_theme_support('automatic-feed-links');
     // Add Support for Post Formats
     // add_theme_support('post-formats', array('quote','video','audio', 'image', 'gallery','link'));
     // Enable excerpts for pages
     add_post_type_support('page', 'excerpt');
     // Configure Thumbnails
     add_theme_support('post-thumbnails');
     // WP 4.1 title tag
     add_theme_support('title-tag');
     // Social meta
     if (!empty($options_alice['global_menu_share_button']) && $options_alice['global_menu_share_button'] == 'enable') {
         add_filter('wp_head', 'az_social_meta', 2);
     }
     // Remove Emoji's
     remove_action('wp_head', 'print_emoji_detection_script', 7);
     remove_action('wp_print_styles', 'print_emoji_styles');
 }
Example #25
0
/**
 * Theme setup
 */
function setup()
{
    // Enable features from Soil when plugin is activated
    // https://roots.io/plugins/soil/
    add_theme_support('soil-clean-up');
    add_theme_support('soil-nav-walker');
    add_theme_support('soil-nice-search');
    add_theme_support('soil-jquery-cdn');
    add_theme_support('soil-relative-urls');
    // Make theme available for translation
    // Community translations can be found at https://github.com/roots/sage-translations
    load_theme_textdomain('sage', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(['primary_navigation' => __('Primary Navigation', 'sage')]);
    // Enable post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    // Enable post formats
    // http://codex.wordpress.org/Post_Formats
    add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
    // Enable HTML5 markup support
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', ['caption', 'comment-form', 'comment-list', 'gallery', 'search-form']);
    // Use main stylesheet for visual editor
    // To add custom styles edit /assets/styles/layouts/_tinymce.scss
    add_editor_style(Assets\asset_path('styles/main.css'));
}
Example #26
0
function et_setup_theme()
{
    global $themename, $shortname, $et_store_options_in_one_row, $default_colorscheme;
    $themename = 'Divi';
    $shortname = 'divi';
    $et_store_options_in_one_row = true;
    $default_colorscheme = "Default";
    $template_directory = get_template_directory();
    require_once $template_directory . '/epanel/custom_functions.php';
    require_once $template_directory . '/includes/functions/comments.php';
    require_once $template_directory . '/includes/functions/sidebars.php';
    load_theme_textdomain('Divi', $template_directory . '/lang');
    require_once $template_directory . '/epanel/core_functions.php';
    require_once $template_directory . '/epanel/post_thumbnails_divi.php';
    include $template_directory . '/includes/widgets.php';
    register_nav_menus(array('primary-menu' => __('Primary Menu', 'Divi'), 'secondary-menu' => __('Secondary Menu', 'Divi'), 'footer-menu' => __('Footer Menu', 'Divi')));
    // don't display the empty title bar if the widget title is not set
    remove_filter('widget_title', 'et_widget_force_title');
    add_action('wp_enqueue_scripts', 'et_add_responsive_shortcodes_css', 11);
    add_theme_support('post-formats', array('video', 'audio', 'quote', 'gallery', 'link'));
    add_theme_support('woocommerce');
    remove_action('woocommerce_sidebar', 'woocommerce_get_sidebar', 10);
    remove_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
    add_action('woocommerce_before_main_content', 'et_divi_output_content_wrapper', 10);
    remove_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
    add_action('woocommerce_after_main_content', 'et_divi_output_content_wrapper_end', 10);
    //remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
    // deactivate page templates and custom import functions
    remove_action('init', 'et_activate_features');
}
Example #27
0
function Destro_setup()
{
    // This theme uses wp_nav_menu() in one location.
    register_nav_menus(array('mainmenu' => __('Main Navigation', 'Destro')));
    // This theme uses post thumbnails
    add_theme_support('post-thumbnails');
    add_image_size('Destrothumb', 450, 300, true);
    // Add default posts and comments RSS feed links to head
    add_theme_support('automatic-feed-links');
    // Add translation support
    load_theme_textdomain('Destro', get_template_directory() . '/languages');
    // Delete default WordPress gallery css
    add_filter('use_default_gallery_style', '__return_false');
    // Add Custom background feature
    if (of_get_option('skin_style')) {
        $custombgargsskin = of_get_option('skin_style');
    } else {
        $custombgargsskin = 'destro';
    }
    if (get_stylesheet_directory() == get_template_directory()) {
        $custombgargs = array('default-color' => '292929', 'default-image' => get_template_directory_uri() . '/images/' . $custombgargsskin . '/page_bg.png');
    } else {
        $custombgargs = array('default-image' => get_stylesheet_directory_uri() . '/images/page_bg.png');
    }
    add_theme_support('custom-background', $custombgargs);
}
 function theme_setup()
 {
     /* This theme uses post thumbnails (aka "featured images")
      *  all images will be cropped to thumbnail size (below), as well as
      *  a square size (also below). You can add more of your own crop
      *  sizes with add_image_size. */
     add_theme_support('post-thumbnails');
     set_post_thumbnail_size(120, 90, true);
     add_image_size('square', 380, 380, true);
     add_image_size('small-square', 185, 185, true);
     add_image_size('half', 640, 640, true);
     add_image_size('post', 600, 600, true);
     add_image_size('about', 400, 566, true);
     add_image_size('single-post', 600, 600, true);
     // 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.
      * You can allow clients to create multiple menus by
      * adding additional menus to the array. */
     register_nav_menus(array('primary' => 'Primary Navigation'));
     /*
      * 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'));
 }
	function my_setup() {
		// This theme styles the visual editor with editor-style.css to match the theme style.
		add_editor_style();

		// This theme uses post thumbnails
		if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
			add_theme_support( 'post-thumbnails' );
			set_post_thumbnail_size( 200, 150, true ); // Normal post thumbnails
			add_image_size( 'slider-post-thumbnail', 940, 446, true ); // Slider Thumbnail
			add_image_size( 'slider-thumb', 100, 50, true ); // Slider Small Thumbnail
		}

		// Add default posts and comments RSS feed links to head
		add_theme_support( 'automatic-feed-links' );

		// custom menu support
		add_theme_support( 'menus' );
		if ( function_exists( 'register_nav_menus' ) ) {
			register_nav_menus(
				array(
					'header_menu' => theme_locals("header_menu"),
					'footer_menu' => theme_locals("footer_menu")
				)
			);
		}
	}
Example #30
0
/**
 * Theme Supports
 */
function ohs_theme_setup()
{
    add_theme_support('post-thumbnails');
    add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
    add_theme_support('title-tag');
    add_theme_support('automatic-feed-links');
    add_theme_support('menus');
    register_nav_menus(array('main-menu' => __('Main Menu', 'ohs-theme')));
    remove_action('wp_head', 'wp_print_scripts');
    remove_action('wp_head', 'wp_print_head_scripts', 9);
    remove_action('wp_head', 'wp_enqueue_scripts', 1);
    add_action('wp_footer', 'wp_print_scripts', 1);
    add_action('wp_footer', 'wp_enqueue_scripts', 1);
    add_action('wp_footer', 'wp_print_head_scripts', 1);
    wp_register_script('jqueryCDN', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', null);
    wp_enqueue_script('jqueryCDN');
    wp_register_script('npo', get_bloginfo('template_url') . '/js/lib/npo.min.js', null);
    wp_register_script('bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js', null);
    wp_register_script('handlebars', get_bloginfo('template_url') . '/js/lib/handlebars.runtime.min.js', null);
    wp_register_script('masonry', get_bloginfo('template_url') . '/js/lib/jquery.masonry.min.js', null);
    wp_register_script('imagesLoaded', get_bloginfo('template_url') . '/js/lib/imagesloaded.pkgd.min.js', null);
    wp_register_script('ohsTemplates', get_bloginfo('template_url') . '/js/templates.min.js', '0.1.1');
    wp_register_script('renderTemplates', get_bloginfo('template_url') . '/js/dev/jquery.renderTemplate.js', '0.1');
    wp_register_script('ohsMain', get_bloginfo('template_url') . '/js/dev/main.js', '0.1');
    wp_register_script('ohsMedia', get_bloginfo('template_url') . '/js/dev/media.js', '0.1');
    wp_enqueue_script('npo', false, array(), false, true);
    wp_enqueue_script('bootstrap', false, array(), false, true);
    wp_enqueue_script('handlebars', false, array(), false, true);
    wp_enqueue_script('masonry', false, array(), false, true);
    wp_enqueue_script('imagesLoaded', false, array(), false, true);
    wp_enqueue_script('ohsTemplates', false, array(), false, true);
    wp_enqueue_script('renderTemplates', false, array(), false, true);
    wp_enqueue_script('ohsMain', false, array(), false, true);
    wp_enqueue_script('ohsMedia', false, array(), false, true);
}