/** * 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. * * @since estate 1.0 */ function estate_setup() { // Initialize SiteOrigin settings siteorigin_settings_init(); // Make the theme translatable load_theme_textdomain('estate', 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 add_theme_support('post-thumbnails'); // Add support for custom backgrounds. add_theme_support('custom-background', array('default-color' => 'f1f1f1')); // This theme uses wp_nav_menu() in one location. register_nav_menus(array('primary' => __('Primary Menu', 'estate'))); // Enable support for Post Formats add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link')); /** * Support SiteOrigin Page Builder */ add_theme_support('siteorigin-panels', array('margin-bottom' => 30, 'responsive' => siteorigin_setting('layout_responsive') && function_exists('estate_premium_responsive_header'), 'home-page' => true, 'home-page-default' => false, 'home-page-template' => 'home-panels.php')); add_theme_support('siteorigin-premium-teaser', array('customizer' => true)); set_post_thumbnail_size(632, 216, true); add_image_size('estate-slide', 960, 480, true); if (!defined('SITEORIGIN_PANELS_VERSION')) { // Only include panels lite if the panels plugin doesn't exist include get_template_directory() . '/extras/panels-lite/panels-lite.php'; } }
/** * 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. * * @since so-current 1.0 */ function so_current_setup() { // Initialize SiteOrigin settings siteorigin_settings_init(); // Make the theme translatable load_theme_textdomain('so-current', 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 add_theme_support('post-thumbnails'); // Add support for custom backgrounds. add_theme_support('custom-background', array('default-color' => '#FFFFFF', 'default-image' => get_template_directory_uri() . '/images/bg.png')); // This theme uses wp_nav_menu() in one location. register_nav_menus(array('primary' => __('Primary Menu', 'so-current'), 'footer' => __('Footer Menu', 'so-current'))); add_theme_support('siteorigin-panels', array('home-page' => true, 'home-page-template' => 'home-panels.php')); // Enable support for Post Formats add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link')); add_image_size('so-current-slide', 960, 480, true); add_image_size('so-current-single', 650, 950, false); set_post_thumbnail_size(320, 156, true); add_post_type_support('page', 'excerpt'); if (!defined('SITEORIGIN_PANELS_VERSION')) { // Only include panels lite if the panels plugin doesn't exist include get_template_directory() . '/extras/panels-lite/panels-lite.php'; } }
/** * 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. * * @since focus 1.0 */ function focus_setup() { // Use SiteOrigin theme settings siteorigin_settings_init(); /** * 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/extras.php'; /** * Custom Theme Options */ //require( get_template_directory() . '/inc/theme-options/theme-options.php' ); /** * Make theme available for translation * Translations can be filed in the /languages/ directory * If you're building a theme based on focus, use a find and replace * to change 'focus' to the name of your theme in all the template files */ load_theme_textdomain('focus', 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 */ add_theme_support('post-thumbnails'); add_theme_support('custom-background', array('default-color' => '#F6F4F2')); /** * Support panels */ add_theme_support('siteorigin-panels', array('margin-bottom' => 30, 'responsive' => siteorigin_setting('layout_responsive'))); add_theme_support('siteorigin-premium-teaser', array('post-type' => array('post'))); /** * This theme uses wp_nav_menu() in one location. */ register_nav_menus(array('primary' => __('Primary Menu', 'focus'))); /** * Add custom image sizes */ add_image_size('slider', 1280, 768, true); set_post_thumbnail_size(297, 160, true); // Include the lite version of the page builder if (!defined('SITEORIGIN_PANELS_VERSION') && !siteorigin_plugin_activation_is_activating('siteorigin-panels')) { include get_template_directory() . '/extras/panels-lite/panels-lite.php'; } }
/** * 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. * * @since clearly 1.0 */ function clearly_setup() { // Initialize SiteOrigin settings siteorigin_settings_init(); // Make the theme translatable load_theme_textdomain('clearly', 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 add_theme_support('post-thumbnails'); add_theme_support('siteorigin-panels', array('home-page' => true, 'home-page-template' => 'home-panels.php')); // This theme uses wp_nav_menu() in one location. register_nav_menus(array('primary' => __('Primary Menu', 'clearly'))); // Enable support for Post Formats add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link')); add_image_size('clearly-slide', 960, 480, true); set_post_thumbnail_size(650, 260, true); if (!defined('SITEORIGIN_PANELS_VERSION') && !siteorigin_plugin_activation_is_activating('siteorigin-panels')) { // Only include panels lite if the panels plugin doesn't exist include get_template_directory() . '/extras/panels-lite/panels-lite.php'; } }
/** * 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. * * @since vantage 1.0 */ function vantage_setup() { // Initialize SiteOrigin settings siteorigin_settings_init(); // Make the theme translatable load_theme_textdomain('vantage', 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 add_theme_support('post-thumbnails'); add_theme_support('siteorigin-panels', array('home-page' => true, 'margin-bottom' => 35, 'home-page-default' => 'default-home', 'home-demo-template' => 'home-panels.php', 'responsive' => siteorigin_setting('layout_responsive'))); // This theme uses wp_nav_menu() in one location. register_nav_menus(array('primary' => __('Primary Menu', 'vantage'))); // Enable support for Post Formats add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link')); // We support WooCommerce add_theme_support('woocommerce'); // define('WOOCOMMERCE_USE_CSS', false); set_post_thumbnail_size(720, 380, true); add_image_size('vantage-thumbnail-no-sidebar', 1080, 380, true); add_image_size('vantage-slide', 960, 480, true); add_image_size('vantage-carousel', 272, 182, true); add_image_size('vantage-grid-loop', 436, 272, true); add_theme_support('site-logo', array('size' => 'full')); if (!defined('SITEORIGIN_PANELS_VERSION') && !siteorigin_plugin_activation_is_activating('siteorigin-panels')) { // Only include panels lite if the panels plugin doesn't exist include get_template_directory() . '/inc/panels-lite/panels-lite.php'; } add_theme_support('siteorigin-premium-teaser', array('customizer' => true, 'settings' => true)); global $content_width, $vantage_site_width; if (!isset($content_width)) { $content_width = 720; } /* pixels */ if (!isset($vantage_site_width)) { $vantage_site_width = siteorigin_setting('layout_bound') == 'full' ? 1080 : 1010; } }
/** * Setup the theme. * * @action setup_theme */ function pitch_setup() { siteorigin_settings_init(); // Initialize the demo mode if (siteorigin_setting('general_demo_mode')) { include get_template_directory() . '/demo/demo.php'; } load_theme_textdomain('pitch', get_template_directory() . '/languages'); // We all like to change the background add_theme_support('custom-header', array('flex-height' => true, 'flex-width' => true, 'header-text' => false)); add_theme_support('custom-background'); // We use thumbnails in archive pages add_theme_support('post-thumbnails'); // This is required add_theme_support('automatic-feed-links'); // The navigation menu at the very top of the screen register_nav_menu('topbar', __('Top Bar Menu', 'pitch')); register_nav_menu('main', __('Main Menu', 'pitch')); set_post_thumbnail_size(455, 270, true); add_image_size('gallery', 620, 348, true); add_image_size('home-loop', 225, 150, true); add_image_size('portfolio', 225, 200, true); add_image_size('project', 600, 600, false); }
/** * 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. * * @since vantage 1.0 */ function vantage_setup() { // Initialize SiteOrigin settings siteorigin_settings_init(); // Make the theme translatable load_theme_textdomain('vantage', 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 add_theme_support('post-thumbnails'); add_theme_support('siteorigin-panels', array('home-page' => true, 'margin-bottom' => 35, 'home-page-default' => 'default-home', 'home-demo-template' => 'home-panels.php', 'responsive' => siteorigin_setting('layout_responsive'))); // This theme uses wp_nav_menu() in one location. register_nav_menus(array('primary' => __('Primary Menu', 'vantage'))); // Enable support for Post Formats add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link')); // We support WooCommerce add_theme_support('woocommerce'); // define('WOOCOMMERCE_USE_CSS', false); set_post_thumbnail_size(720, 380, true); add_image_size('vantage-thumbnail-no-sidebar', 1080, 380, true); add_image_size('vantage-slide', 960, 480, true); add_image_size('vantage-carousel', 272, 182, true); add_image_size('vantage-grid-loop', 436, 272, true); add_theme_support('site-logo', array('size' => 'full')); if (!defined('SITEORIGIN_PANELS_VERSION') && !siteorigin_plugin_activation_is_activating('siteorigin-panels')) { // Only include panels lite if the panels plugin doesn't exist include get_template_directory() . '/inc/panels-lite/panels-lite.php'; } add_theme_support('siteorigin-premium-teaser', array('customizer' => true, 'settings' => true)); global $content_width, $vantage_site_width; if (!isset($content_width)) { $content_width = 720; } /* pixels */ if (!isset($vantage_site_width)) { $vantage_site_width = siteorigin_setting('layout_bound') == 'full' ? 1080 : 1010; } $container = 'content'; $render_function = ''; $wrapper = true; // The posts_per_page setting only works when type is 'scroll'. // When type is set to 'click' either explicitly or automatically, // due to there being footer widgets, it uses the "Blog pages show at most X posts" setting // under Settings > Reading instead. :( // https://wordpress.org/support/topic/posts_per_page-not-having-any-effect $posts_per_page = 7; if (siteorigin_setting('blog_archive_layout') == 'circleicon') { $container = 'vantage-circleicon-loop'; $render_function = 'vantage_infinite_scroll_render'; $wrapper = false; $posts_per_page = 6; } else { if (siteorigin_setting('blog_archive_layout') == 'grid') { $container = 'vantage-grid-loop'; $render_function = 'vantage_infinite_scroll_render'; $wrapper = false; $posts_per_page = 8; } } add_filter('infinite_scroll_settings', 'vantage_infinite_scroll_settings'); add_theme_support('infinite-scroll', array('container' => $container, 'footer' => 'page', 'render' => $render_function, 'wrapper' => $wrapper, 'posts_per_page' => $posts_per_page, 'type' => 'click')); }