'', 'default-image' => '', 'default-repeat' => '', 'default-position-x' => '', 'default-attachment' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' )); add_image_size( 'one-login-business-featured-image', 2000, 1200, true ); add_image_size( 'one-login-business-thumbnail-avatar', 100, 100, true ); $GLOBALS['content_width'] = 525; register_nav_menus( array( 'primary' => __( 'Primary Menu', 'one-login-business' ), 'footer' => __('Footer Menu', 'one-login-business'), ) ); add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Add theme support for Custom Logo. add_theme_support( 'custom-logo', array( 'width' => 250, 'height' => 250, 'flex-width' => true, ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, and column width. */ add_editor_style( array( 'assets/css/editor-style.css', one_login_business_fonts_url() ) ); } add_action( 'after_setup_theme', 'one_login_business_setup' ); function one_login_business_widgets_init() { register_sidebar( array( 'name' => __( 'Blog Sidebar', 'one-login-business' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'one-login-business' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Sidebar 2', 'one-login-business' ), 'id' => 'sidebar-2', 'description' => __( 'Add widgets here to appear in your pages and posts', 'one-login-business' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 1', 'one-login-business' ), 'id' => 'footer-1', 'description' => __( 'Add widgets here to appear in your footer.', 'one-login-business' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 2', 'one-login-business' ), 'id' => 'footer-2', 'description' => __( 'Add widgets here to appear in your footer.', 'one-login-business' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 3', 'one-login-business' ), 'id' => 'footer-3', 'description' => __( 'Add widgets here to appear in your footer.', 'one-login-business' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 4', 'one-login-business' ), 'id' => 'footer-4', 'description' => __( 'Add widgets here to appear in your footer.', 'one-login-business' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'one_login_business_widgets_init' ); function one_login_business_fonts_url(){ $font_url = ''; $font_family = array(); $font_family[] = 'Poppins:200,200i,300,300i,400,400i,500,500i,700i,800i'; $query_args = array( 'family' => rawurlencode(implode('|',$font_family)), ); $font_url = add_query_arg($query_args,'//fonts.googleapis.com/css'); return $font_url; } //Enqueue scripts and styles. function one_login_business_scripts() { // Add custom fonts, used in the main stylesheet. wp_enqueue_style( 'one-login-business-fonts', one_login_business_fonts_url(), array(), null ); //Bootstarp wp_enqueue_style( 'bootstrap', get_template_directory_uri().'/assets/css/bootstrap.css' ); // Theme stylesheet. wp_enqueue_style( 'one-login-business-style', get_stylesheet_uri() ); // Load the Internet Explorer 9 specific stylesheet, to fix display issues in the Customizer. if ( is_customize_preview() ) { wp_enqueue_style( 'one-login-business-ie9', get_theme_file_uri( '/assets/css/ie9.css' ), array( 'one-login-business-style' ), '1.0' ); wp_style_add_data( 'one-login-business-ie9', 'conditional', 'IE 9' ); } // Load the Internet Explorer 8 specific stylesheet. wp_enqueue_style( 'one-login-business-ie8', get_theme_file_uri( '/assets/css/ie8.css' ), array( 'one-login-business-style' ), '1.0' ); wp_style_add_data( 'one-login-business-ie8', 'conditional', 'lt IE 9' ); //font-awesome wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/assets/css/fontawesome-all.css' ); wp_enqueue_script( 'one-login-business-custom.js', get_theme_file_uri( '/assets/js/one-login-business-custom.js' ), array( 'jquery' ), true ); wp_enqueue_script( 'bootstrap.js', get_theme_file_uri( '/assets/js/bootstrap.js' ), array( 'jquery' ),true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'one_login_business_scripts' ); function one_login_business_front_page_template( $template ) { return is_home() ? '' : $template; } add_filter( 'frontpage_template', 'one_login_business_front_page_template' ); require get_parent_theme_file_path( '/inc/custom-header.php' ); require get_parent_theme_file_path( '/inc/template-tags.php' ); require get_parent_theme_file_path( '/inc/template-functions.php' ); require get_parent_theme_file_path( '/inc/customizer.php' ); // Change number or products per row to 3 add_filter('loop_shop_columns', 'one_login_business_loop_columns'); if (!function_exists('one_login_business_loop_columns')) { function one_login_business_loop_columns() { return 3; // 3 products per row } } function one_login_business_sanitize_dropdown_pages( $page_id, $setting ) { // Ensure $input is an absolute integer. $page_id = absint( $page_id ); // If $page_id is an ID of a published page, return it; otherwise, return the default. return ( 'publish' == get_post_status( $page_id ) ? $page_id : $setting->default ); } function one_login_business_sanitize_choices( $input, $setting ) { global $wp_customize; $control = $wp_customize->get_control( $setting->id ); if ( array_key_exists( $input, $control->choices ) ) { return $input; } else { return $setting->default; } } /* Excerpt Limit Begin */ function one_login_business_string_limit_words($string, $word_limit) { $words = explode(' ', $string, ($word_limit + 1)); if(count($words) > $word_limit) array_pop($words); return implode(' ', $words); }