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 https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support('post-thumbnails'); add_image_size( 'business-shuffle-400x400', 400, 400, true ); add_image_size( 'business-shuffle-150x100', 150, 100, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus(array( 'business-shuffle-menu' => esc_html__('Primary', 'business-shuffle'), )); /* * 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', )); // Set up the WordPress core custom background feature. add_theme_support('custom-background', apply_filters('business_shuffle_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ))); // Add theme support for selective refresh for widgets. add_theme_support('customize-selective-refresh-widgets'); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support('custom-logo', array( 'height' => 50, 'width' => 200, 'flex-width' => true, 'flex-height' => true, )); add_post_type_support( 'page', 'excerpt' ); } endif; add_action('after_setup_theme', 'business_shuffle_setup'); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function business_shuffle_content_width() { // This variable is intended to be overruled from themes. // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}. // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $GLOBALS['content_width'] = apply_filters('business_shuffle_content_width', 640); } add_action('after_setup_theme', 'business_shuffle_content_width', 0); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function business_shuffle_widgets_init() { register_sidebar(array( 'name' => esc_html__('Right Sidebar', 'business-shuffle'), 'id' => 'business-shuffle-right-sidebar', 'description' => esc_html__('Add widgets here.', 'business-shuffle'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => esc_html__('Footer One', 'business-shuffle'), 'id' => 'business-shuffle-footer1', 'description' => esc_html__('Add widgets here.', 'business-shuffle'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => esc_html__('Footer Two', 'business-shuffle'), 'id' => 'business-shuffle-footer2', 'description' => esc_html__('Add widgets here.', 'business-shuffle'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => esc_html__('Footer Three', 'business-shuffle'), 'id' => 'business-shuffle-footer3', 'description' => esc_html__('Add widgets here.', 'business-shuffle'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => esc_html__('Footer Four', 'business-shuffle'), 'id' => 'business-shuffle-footer4', 'description' => esc_html__('Add widgets here.', 'business-shuffle'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } add_action('widgets_init', 'business_shuffle_widgets_init'); if ( ! function_exists( 'business_shuffle_fonts_url' ) ) : /** * Register Google fonts for Total. * * @since Total 1.0 * * @return string Google fonts URL for the theme. */ function business_shuffle_fonts_url() { $fonts_url = ''; $fonts = array(); $subsets = 'latin,latin-ext'; /* * Translators: If there are characters in your language that are not supported * by Open Sans, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Poppins font: on or off', 'business-shuffle' ) ) { $fonts[] = 'Poppins:300,300i,400,400i,600,600i,700,700i'; } /* * Translators: If there are characters in your language that are not supported * by Inconsolata, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Teko font: on or off', 'business-shuffle' ) ) { $fonts[] = 'Teko:400,500,600,700'; } /* * Translators: To add an additional character subset specific to your language, * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language. */ $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'business-shuffle' ); if ( 'cyrillic' == $subset ) { $subsets .= ',cyrillic,cyrillic-ext'; } elseif ( 'greek' == $subset ) { $subsets .= ',greek,greek-ext'; } elseif ( 'devanagari' == $subset ) { $subsets .= ',devanagari'; } elseif ( 'vietnamese' == $subset ) { $subsets .= ',vietnamese'; } if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => urlencode(implode( '|', $fonts )) , 'subset' => urlencode($subsets) , ), '//fonts.googleapis.com/css' ); } return esc_url_raw($fonts_url); } endif; /** * Enqueue scripts and styles. */ function business_shuffle_scripts() { wp_enqueue_style('business-shuffle-fonts', business_shuffle_fonts_url(), array(), null ); wp_enqueue_style('business-shuffle-fontawesome', get_template_directory_uri() . '/css/fontawesome.css', array(), '5.2.0'); wp_enqueue_style('business-shuffle-owl-carousel', get_template_directory_uri() . '/css/owl.carousel.css', array(), '2.3.4'); wp_enqueue_style('business-shuffle-style', get_stylesheet_uri()); wp_add_inline_style('business-shuffle-style', business_shuffle_dynamic_style() ); wp_enqueue_script('business-shuffle-waypoint', get_template_directory_uri() . '/js/waypoint.js', array(), '1.0.0', true); wp_enqueue_script('business-shuffle-owl-carousel', get_template_directory_uri() . '/js/owl.carousel.js', array('jquery'), '2.3.4', true); wp_enqueue_script('business-shuffle-superfish', get_template_directory_uri() . '/js/superfish.js', array('jquery'), '1.0', true); wp_enqueue_script('business-shuffle-custom-scripts', get_template_directory_uri() . '/js/custom-scripts.js', array('jquery'), '1.0.0', true); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'business_shuffle_scripts'); /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require get_template_directory() . '/inc/template-functions.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer/customizer.php'; /** * Dynamic Styles. */ require get_template_directory() . '/inc/style.php'; /** * Load WooCommerce compatibility file. */ if (class_exists('WooCommerce')) { require get_template_directory() . '/inc/woocommerce.php'; } /** * Widgets additions. */ require get_template_directory() . '/inc/widgets/widget-fields.php'; require get_template_directory() . '/inc/widgets/widget-contact-info.php'; require get_template_directory() . '/inc/widgets/widget-personal-info.php'; require get_template_directory() . '/inc/widgets/widget-latest-post.php';