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' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'menu-1' => esc_html__( 'Primary', 'agensy' ), 'menu-2' => esc_html__('Footer Menu', 'agensy'), ) ); /* * 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( 'agensy_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', 'agensy_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 agensy_content_width() { $GLOBALS['content_width'] = apply_filters( 'agensy_content_width', 640 ); } add_action( 'after_setup_theme', 'agensy_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function agensy_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'agensy' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'agensy' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

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

', 'after_title' => '

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

', 'after_title' => '

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

', 'after_title' => '

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

', 'after_title' => '

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

', 'after_title' => '

', )); } add_action( 'widgets_init', 'agensy_widgets_init' ); /** *define image size **/ add_image_size('agensy-slider-image', 1920, 928, true); add_image_size('agensy-team-image', 370, 490, true); add_image_size('agensy-blog-image', 571, 353, true); add_image_size('agensy-about-image', 440, 440, true); /** * Enqueue scripts and styles. */ function agensy_scripts() { $query_args = array('family' => 'Playfair+Display:400,300,700,serif|Open+Sans:400,700|Hind:400,500,600,700|Roboto+Slab:100,300,400,700|Raleway:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic,sans-serif|Lato:400,300,700,900,100,sans-serif|Merriweather:400,300,700,900,100,Arial,Helvetica,sans-serif'); wp_enqueue_style('google-fonts', add_query_arg($query_args, "//fonts.googleapis.com/css")); wp_enqueue_style( 'agensy-style', get_stylesheet_uri()); wp_enqueue_style( 'agensy-font-awesome', get_template_directory_uri() . '/assets/externals/font-awesome/css/font-awesome.min.css' ); wp_enqueue_style( 'agensy-style-font', get_template_directory_uri() . '/assets/fonts/fonts.min.css' ); wp_enqueue_style( 'agensy-style-font', get_template_directory_uri() . '/assets/fonts/fonts.min.css' ); wp_enqueue_style( 'agensy-style-slider', get_template_directory_uri() . '/assets/css/owl.carousel.min.css' ); wp_enqueue_script( 'agensy-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), '20151215', true ); wp_enqueue_script( 'agensy-script-slider', get_template_directory_uri() . '/assets/js/owl.carousel.min.js', array('jquery'), '20151215', true ); wp_enqueue_script( 'agensy-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array(), '20151215', true ); wp_enqueue_script( 'agensy-custom', get_template_directory_uri() . '/assets/js/custom.js', array(), '20151215', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'agensy_scripts' ); /** *enqueue scripts and styles in backend */ function agensy_admin_scripts() { wp_enqueue_style( 'agensy-customizer-style', get_template_directory_uri() . '/inc/customizer/assets/customizer-style.css' ); wp_enqueue_script( 'agensy-customizer-scripts', get_template_directory_uri() . '/inc/customizer/assets/customizer-scripts.js', array(), '20151215', true ); } add_action( 'admin_enqueue_scripts', 'agensy_admin_scripts' ); /** * Calling the init file */ require get_template_directory() . '/inc/init.php'; /*removing breadcrumb header*/ add_action( 'init', 'agensy_remove_wc_breadcrumbs' ); function agensy_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( 'agensy_woocommerce_wrapper_before' ) ) { /** * Before Content. * * Wraps all WooCommerce content in wrappers which match the theme markup. * * @return void */ function agensy_woocommerce_wrapper_before() { ?>