tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* *Woocommerce add function */ add_theme_support( 'woocommerce' ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); /* * 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' ); /** *define image size **/ add_image_size('agency-lite-slider-image', 1920, 928, true); add_image_size('agency-lite-team-image', 370, 490, true); add_image_size('agency-lite-blog-image', 571, 353, true); add_image_size('agency-lite-about-image', 440, 440, true); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'agency-lite-primary-menu' => esc_html__( 'Primary', 'agency-lite' ), 'agency-lite-footer-menu' => esc_html__('Footer Menu', 'agency-lite'), ) ); /* * 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( 'agency_lite_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' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); } endif; add_action( 'after_setup_theme', 'agency_lite_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 agency_lite_content_width() { $GLOBALS['content_width'] = apply_filters( 'agency_lite_content_width', 640 ); } add_action( 'after_setup_theme', 'agency_lite_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function agency_lite_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'agency-lite' ), 'id' => 'agency-lite-sidebar', 'description' => esc_html__( 'Add widgets here.', 'agency-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar(array( 'name' =>esc_html__('Home Team Area','agency-lite'), 'id' => 'home-team-area', 'description' => esc_html__( 'Add Team Widgets here.', 'agency-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' =>esc_html__('Footer Widget Area One','agency-lite'), 'id' => 'footer-widget-area-one', 'description' => esc_html__( 'Add Footer Widgets One here.', 'agency-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' =>esc_html__('Footer Widget Area Two','agency-lite'), 'id' => 'footer-widget-area-two', 'description' => esc_html__( 'Add Footer Widgets Two here.', 'agency-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' =>esc_html__('Footer Widget Area Three','agency-lite'), 'id' => 'footer-widget-area-three', 'description' => esc_html__( 'Add Footer Widgets Three here.', 'agency-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' =>esc_html__('Footer Widget Area Four','agency-lite'), 'id' => 'footer-widget-area-four', 'description' => esc_html__( 'Add Footer Widgets Four here.', 'agency-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } add_action( 'widgets_init', 'agency_lite_widgets_init' ); /** * Enqueue scripts and styles. */ function agency_lite_scripts() { $query_args = array('family' => 'Playfair+Display:400,300,700|Hind:400,500,600,700'); wp_enqueue_style('agency-lite-google-fonts', add_query_arg($query_args, "//fonts.googleapis.com/css")); wp_enqueue_style( 'agency-lite-style', get_stylesheet_uri()); wp_enqueue_style( 'agency-lite-font-awesome', get_template_directory_uri() . '/assets/externals/font-awesome/css/font-awesome.min.css' ); wp_enqueue_style( 'agency-lite-owl-carousel', get_template_directory_uri() . '/assets/css/owl.carousel.min.css' ); wp_enqueue_script( 'agency-lite-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), '1.0', true ); wp_enqueue_script( 'agency-lite-owl-carousel', get_template_directory_uri() . '/assets/js/owl.carousel.min.js', array('jquery'), '1.0', true ); wp_enqueue_script( 'agency-lite-custom', get_template_directory_uri() . '/assets/js/custom.js', array(), '1.0', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'agency_lite_scripts' ); /** *enqueue scripts and styles in backend */ function agency_lite_admin_scripts() { wp_enqueue_style( 'agency-lite-customizer-style', get_template_directory_uri() . '/inc/customizer/assets/customizer-style.css' ); wp_enqueue_script( 'agency-lite-customizer-scripts', get_template_directory_uri() . '/inc/customizer/assets/customizer-scripts.js', array(), '1.0', true ); } add_action( 'admin_enqueue_scripts', 'agency_lite_admin_scripts' ); /** * Calling the init file */ require get_template_directory() . '/inc/init.php'; /*removing breadcrumb header*/ add_action( 'wp_head', 'agency_lite_remove_wc_breadcrumbs' ); function agency_lite_remove_wc_breadcrumbs() { remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); } /** * Remove default WooCommerce wrapper. */ remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); if ( ! function_exists( 'agency_lite_woocommerce_wrapper_before' ) ) { /** * Before Content. * * Wraps all WooCommerce content in wrappers which match the theme markup. * * @return void */ function agency_lite_woocommerce_wrapper_before() { ?>