tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support('title-tag'); // Add default posts and comments RSS feed links to head. add_theme_support('automatic-feed-links'); //Register Menus register_nav_menus(array( 'primary' => __('Primary Navigation(Header)', 'azeen'), 'top-menu' => esc_html__('Top Bar(Header)', 'azeen') )); // Declare WooCommerce support add_theme_support('woocommerce'); // Add theme support for woocommerce product gallery added in WooCommerce 3.0. add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-slider' ); //Custom Background $args = array( 'default-color' => 'f7f7f7', ); add_theme_support('custom-background', $args); /* * 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', )); /* * Enable support for Post Formats. * * See: https://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'video', 'image', 'gallery', 'audio', ) ); /* * Enable support for custom Header image. * * @since advance */ $args = array( 'flex-width' => true, 'flex-height' => true, 'header-text' => false, ); add_theme_support('custom-header', $args); //Post Thumbnail add_theme_support('post-thumbnails'); // Enables post and comment RSS feed links to head add_theme_support('automatic-feed-links'); // Add theme support for selective refresh for widgets. add_theme_support('customize-selective-refresh-widgets'); /* /* * Enable support for custom logo. * * @since azeen */ $defaults = array( 'height' => 100, 'width' => 220, 'flex-width' => true, 'flex-height' => true, 'header-text' => array( 'site-title', 'site-description' ), ); add_theme_support('custom-logo', $defaults); /* * 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'); // Add featured image sizes // // Sizes are optimized and cropped for landscape aspect ratio // and optimized for HiDPI displays on 'small' and 'medium' screen sizes. add_image_size('azeen-small', 110, 85, true); // name, width, height, crop add_image_size('azeen-news-big', 370, 370, true); add_image_size('azeen-list-post', 400, 350, true); add_image_size('azeen-large', 750, 400, true); add_image_size('azeen-xlarge', 1440, 400, true); add_image_size('azeen-slider', 1440, 500, true); add_image_size('azeen-slider2', 750, 450, true); // Adding support for core block visual styles. add_theme_support( 'wp-block-styles' ); // Add support for full and wide align images. add_theme_support( 'align-wide' ); } endif; // azeen_setup add_action('after_setup_theme', 'azeen_setup_theme'); /** * 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 azeen_content_width() { $GLOBALS['content_width'] = apply_filters( 'azeen_content_width', 640 ); } add_action( 'after_setup_theme', 'azeen_content_width', 0 ); //enqueue css and js function azeen_scripts() { $azeen = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_style('fontawesome', get_template_directory_uri() . '/assets/css/fonts/css/font-awesome'.$azeen.'.css', false); wp_enqueue_style('main_azeen', get_template_directory_uri() . '/assets/css/main'.$azeen.'.css',false); wp_enqueue_style('animate', get_template_directory_uri() . '/assets/css/animate.css',false); wp_enqueue_style('azeen-style', get_stylesheet_uri()); // js wp_enqueue_script('azeen_main_js', get_template_directory_uri().'/assets/js/main'.$azeen.'.js', array('jquery'), true); wp_enqueue_script('azeen_library', get_template_directory_uri().'/assets/js/library'.$azeen.'.js', array('jquery'), true); if (is_singular()) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'azeen_scripts'); /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function azeen_widgets_init() { register_sidebar(array( 'name' => __('Blog Sidebar ', 'azeen'), 'id' => 'right-sidebar', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('Footer', 'azeen'), 'id' => 'azeen-footer_sidebar', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); } add_action('widgets_init', 'azeen_widgets_init');