100, 'width' => 400, 'flex-width' => true, 'flex-height' => true, ) ); add_theme_support( 'customizer' ); add_theme_support( 'custom-header', array( 'width' => 1920, 'height' => 300, 'flex-height' => true, 'header-text' => false, 'unlink-homepage-logo' => true, ) ); add_theme_support( 'custom-background', array( 'default-color' => '', 'default-image' => '', 'default-repeat' => '', 'default-position-x' => '', 'default-attachment' => '', ) ); add_theme_support( 'align-wide' ); // Add support for Translation load_theme_textdomain( 'ca-biz-startup', get_template_directory() . '/languages' ); //------------------Include Bootstap--------------- function ca_biz_startup_enqueue_styles() { wp_enqueue_style( 'ca-biz-startup-bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css' ); wp_enqueue_script( 'ca-biz-startup-bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array( 'jquery' ), '', true ); wp_enqueue_script( 'ca-biz-startup-custom-js', get_template_directory_uri() . '/menu/menu.js', array( 'jquery' ), '1.0', true ); wp_enqueue_style( 'ca-biz-startup-custom-css', get_template_directory_uri() . '/menu/menu.css', array(), '1.0', 'all' ); wp_enqueue_style( 'ca-biz-startup-google-fonts', 'https://fonts.googleapis.com/css?family=Roboto&display=swap' ); wp_enqueue_style( 'ca-biz-startup-custom-style1', get_stylesheet_directory_uri() . '/inc/customizer-button/customizer-custom.css' ); //---------------Color selector file adding-- wp_enqueue_style( 'ca-biz-startup-color-selector', get_stylesheet_uri() ); require get_parent_theme_file_path( '/inc/color-selector.php' ); wp_add_inline_style( 'ca-biz-startup-color-selector',$custom_css ); } add_action( 'wp_enqueue_scripts', 'ca_biz_startup_enqueue_styles' ); //-------------------Loading Fonts Locally----------- function ca_biz_startup_enqueue_assets() { // Include the file. require_once get_theme_file_path( 'inc/wptt-webfont-loader.php' ); // Load the theme stylesheet. wp_enqueue_style( 'ca-biz-startup', get_stylesheet_directory_uri() . '/style.css', array(), '1.0' ); // Load the webfont. wp_add_inline_style( 'ca-biz-startup', wptt_get_webfont_styles( 'https://fonts.googleapis.com/css2?family=Literata&display=swap' ) ); } add_action( 'wp_enqueue_scripts', 'ca_biz_startup_enqueue_assets' ); //-------------------------Header Code-------------------------------- //--------------------My Menu Registration----- // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'ca-biz-startup' ), ) ); //---------------------------My Menu--------------------------------- if( ! function_exists( 'ca_biz_startup_primary_nagivation' ) ) : /** * Primary Navigation. */ function ca_biz_startup_primary_nagivation(){ ?> '; echo '
This is my custom block pattern
', ) ); } } add_action( 'init', 'ca_biz_startup_mytheme_register_block_patterns' ); function ca_biz_startup_add_editor_styles() { add_editor_style( 'editor-style.css' ); } add_action( 'admin_init', 'ca_biz_startup_add_editor_styles' ); //------------------------Comments------------- function ca_biz_startup_enable_threaded_comments() { if (is_singular() && comments_open() && (get_option('thread_comments') == 1)) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'ca_biz_startup_enable_threaded_comments'); // ----------------------------Menu navigation keyboard-------------- function ca_biz_startup_add_tabindex_to_menu_items( $atts, $item, $args, $depth ) { // Add tabindex="0" to the menu item $atts['tabindex'] = '0'; return $atts; } add_filter( 'nav_menu_link_attributes', 'ca_biz_startup_add_tabindex_to_menu_items', 10, 4 ); //--------------------Define-------------------- define('CA_BIZ_STARTUP_PRO_URL',__('https://cawpthemes.com/ca-biz-startup-premium-wordpress-theme/','ca-biz-startup')); define('CA_BIZ_STARTUP_PRO_SUPPORT',__('https://cawpthemes.com/support/','ca-biz-startup')); define('CA_BIZ_STARTUP_PRO_DEMO',__('https://demo.cawpthemes.com/biz-pro/','ca-biz-startup')); define('CA_BIZ_STARTUP_PRO_DOCUMENTATION',__('https://cawpthemes.com/docs/ca-biz-startup-free-theme-docs/','ca-biz-startup')); define('CA_BIZ_STARTUP_FREE_URL',__('https://demo.cawpthemes.com/biz-free/','ca-biz-startup'));