urlencode( implode( '|', $fonts ) ), 'subset' => urlencode( $subsets ), ), 'https://fonts.googleapis.com/css' ); } return $fonts_url; } } /** * Enqueue CSS stylesheets */ if( ! function_exists( 'bizzoy_enqueue_styles' ) ) { function bizzoy_enqueue_styles() { // Bootstrap CSS wp_enqueue_style( 'bizzoy-fonts', bizzoy_fonts_url(), array(), null ); wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/font-awesome.css'); wp_enqueue_style('swiper', get_template_directory_uri() . '/assets/css/swiper.css'); wp_enqueue_style( 'bizzoy-style', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', 'bizzoy_enqueue_styles' ); } /** * Enqueue JS scripts */ if( ! function_exists( 'bizzoy_enqueue_scripts' ) ) { function bizzoy_enqueue_scripts() { wp_enqueue_script('jquery-hover3d', get_template_directory_uri() . '/assets/js/jquery.hover3d.js', array('jquery'), '', true); wp_enqueue_script('swiper', get_template_directory_uri() . '/assets/js/swiper.js', array(), '', true); wp_enqueue_script('bizzoy-main', get_template_directory_uri() . '/assets/js/main.js', array(), '', true); } add_action( 'wp_enqueue_scripts', 'bizzoy_enqueue_scripts' ); } function bizzoy_sidebars() { // Blog Sidebar register_sidebar(array( 'name' => esc_html__( 'Blog Sidebar', "bizzoy"), 'id' => 'blog-sidebar', 'description' => esc_html__( 'Sidebar on the blog layout.', "bizzoy"), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); // Footer Sidebar register_sidebar(array( 'name' => esc_html__( 'Footer Widget Area', "bizzoy"), 'id' => 'bizzoy-footer-widget-area', 'description' => esc_html__( 'The footer widget area', "bizzoy"), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); } add_action( 'widgets_init', 'bizzoy_sidebars' ); function bizzoy_archive_page_title(){ if( is_archive() ) { $archive_text = get_theme_mod('archive_prefix', __('Archive','bizzoy')); echo '

'; if ( is_day() ) : printf( esc_html__( '%1$s %2$s', 'bizzoy' ), esc_html($archive_text), esc_html(get_the_date()) ); elseif ( is_month() ) : printf( esc_html__( '%1$s %2$s', 'bizzoy' ), esc_html($archive_text), esc_html(get_the_date( 'F Y' )) ); elseif ( is_year() ) : printf( esc_html__( '%1$s %2$s', 'bizzoy' ), esc_html($archive_text), esc_html(get_the_date( 'Y' )) ); elseif( is_category() ): $category_text = get_theme_mod('category_prefix',__('Category','bizzoy')); printf( esc_html__( '%1$s %2$s', 'bizzoy' ), esc_html($category_text), single_cat_title( '', false ) ); elseif( is_author() ): $author_text = get_theme_mod('author_prefix',__('All posts by','bizzoy')); printf( esc_html__( '%1$s %2$s', 'bizzoy' ), esc_html($author_text), esc_html(get_the_author() )); elseif( is_tag() ): $tag_text = get_theme_mod('tag_prefix',__('Tag','bizzoy')); printf( esc_html__( '%1$s %2$s', 'bizzoy' ), esc_html($tag_text), single_tag_title( '', false ) ); elseif( class_exists( 'WooCommerce' ) && is_shop() ): $shop_text = get_theme_mod('shop_prefix',__('Shop','bizzoy')); printf( esc_html__( '%1$s %2$s', 'bizzoy' ), esc_html($shop_text), single_tag_title( '', false )); elseif( is_archive() ): the_archive_title( '

', '

' ); endif; echo ''; } elseif( is_search() ) { $search_text = get_theme_mod('search_prefix',__('Search results for','bizzoy')); echo '

'; printf( esc_html__( '%1$s %2$s', 'bizzoy' ), esc_html($search_text), get_search_query() ); echo '

'; } elseif( is_404() ) { $breadcrumbs_text = get_theme_mod('404_prefix',__('404 Page Not Fouund','bizzoy')); echo '

'; printf( esc_html( '%1$s ', 'bizzoy' ) , esc_html($breadcrumbs_text) ); echo '

'; } else { $allowed_html = array( 'br' => array(), 'em' => array(), 'strong' => array(), 'i' => array( 'class' => array(), ), 'span' => array(), ); echo '

'.wp_kses( force_balance_tags( get_the_title()), $allowed_html ).'

'; } } function bizzoy_inline_css(){ $bizzoy_color_scheme = get_theme_mod( 'bizzoy_color_scheme', '#ff5722' ); $custom_css = ''; $custom_css .= ' .icon-boxes-type-2 .icon-box-wrapper h5>a, .blog-more-btn:hover, .blog-by-img:hover, .recent-posts .blog-card-wrapper .card-content .card-blog-body h5 a:hover, .navbar-fill .navbar-inner .navbar-menu .navbar-search .search-icon, .navbar-fill .navbar-inner .navbar-menu .navbar-additional .qoute-btn a, .footer-area .widget_archive li a:hover, .footer-area .widget_categories li a:hover, .footer-area .widget_meta li a:hover, .footer-area .widget_recent_comments a:hover, .footer-widget .menu li a:hover, .footer-area .widget_pages li a:hover, .swiper-button-prev-default:hover i, .swiper-button-next-default:hover i, .navbar-fill .navbar-inner .navbar-menu .navbar-menu-list li a:hover, .sidebar a:hover, .recent-posts .blog-card-wrapper .card-content .card-blog-body .card-blog-footer i, .navbar .navbar-inner .navbar-menu .navbar-menu-list .sub-menu li a:hover, .navbar .navbar-inner .navbar-menu .navbar-menu-list .megamenu li a:hover, .page-header .breadcrumbs-wrapper .breadcrumbs .breadcrumbs-list .active a, .comment-respond .form-submit input:hover, #today a, #prev a, .logged-in-as ar{ color: ' . esc_html( $bizzoy_color_scheme) . '; }'; $custom_css .=' .button-default-color, #looking-consultant, .widget_calendar th, .swiper-pagination-bullets-default .swiper-pagination-bullet-active, .widget_tag_cloud .tagcloud a:hover, .footer-area .widget_categories li:before, form#searchform input[type="submit"], .widget_categories li:before, .nav-links .current, .comment-respond .form-submit input{ background-color:' . esc_html( $bizzoy_color_scheme) . '; }'; $custom_css .=' .comment-respond .form-submit input, form#searchform input[type="submit"], blockquote { border-color:' . esc_html( $bizzoy_color_scheme) . ' ; }'; $custom_css .=' .comment-respond .form-submit input, form#searchform input[type="submit"], blockquote { border-left: 2px solid ' . esc_html( $bizzoy_color_scheme) . ' ; margin-left: 0; padding: 0 0 0 1rem; }'; wp_add_inline_style( 'bizzoy-style', $custom_css ); } add_action( 'wp_enqueue_scripts', 'bizzoy_inline_css' );