tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * 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' ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); add_theme_support( 'woocommerce' ); // Add support for Block Styles. add_theme_support( 'wp-block-styles' ); // Add support for full and wide align images. add_theme_support( 'align-wide' ); // Add support for editor styles. add_theme_support( 'editor-styles' ); // Enqueue editor styles. add_editor_style( 'style-editor.css' ); // Add support for responsive embedded content. add_theme_support( 'responsive-embeds' ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /** * Add support for core custom logo. */ add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); // Add support for Custom Header. add_theme_support( 'custom-header', apply_filters( 'almaira_shop_custom_header_args', array( 'default-image' => ALMAIRA_SHOP_THEME_URI.'images/almaira-header-image.png', 'flex-height' => true, 'header-text' => false, 'video' => true, ) ) ); register_default_headers( array( 'default-image' => array( 'url' => '%s/images/almaira-header-image.png', 'thumbnail_url' => '%s/images/almaira-header-image.png', 'description' => __( 'Default Header Image', 'almaira-shop' ), ), ) ); // Add support for Custom Background. if(get_theme_mod('almaira_shop_color_scheme')=='alm-dark'){ $args = array( 'default-color' => '1f1f1f', ); }else{ $args = array( 'default-color' => 'f1f1f1', ); } add_theme_support( 'custom-background',$args ); $GLOBALS['content_width'] = apply_filters( 'almaira_shop_content_width', 640 ); add_theme_support( 'woocommerce', array( 'thumbnail_image_width' => 320, ) ); // Recommend plugins add_theme_support( 'recommend-plugins', array( 'hunk-companion' => array( 'name' => esc_html__( 'Hunk Companion', 'almaira-shop' ), 'active_filename' => 'hunk-companion/hunk-companion.php', ), 'woocommerce' => array( 'name' => esc_html__( 'Woocommerce', 'almaira-shop' ), 'active_filename' => 'woocommerce/woocommerce.php', ), 'yith-woocommerce-wishlist' => array( 'name' => esc_html__( 'YITH WooCommerce Wishlist', 'almaira-shop' ), 'active_filename' => 'yith-woocommerce-wishlist/init.php', ), 'yith-woocommerce-compare' => array( 'name' => esc_html__( 'YITH WooCommerce Compare', 'almaira-shop' ), 'active_filename' => 'yith-woocommerce-compare/init.php', ), 'lead-form-builder' => array( 'name' => esc_html__( 'Lead Form Builder', 'almaira-shop' ), 'active_filename' => 'lead-form-builder/lead-form-builder.php', ), 'wp-popup-builder' => array( 'name' => esc_html__( 'WP Popup Builder – Popup Forms & Newsletter', 'almaira-shop' ), 'active_filename' => 'wp-popup-builder/wp-popup-builder.php', ), 'themehunk-megamenu-plus' => array( 'name' => esc_html__( 'Megamenu plugin from Themehunk.', 'almaira-shop' ), 'active_filename' => 'themehunk-megamenu-plus/themehunk-megamenu.php', ), 'instagram-feed' => array( 'name' => esc_html__( 'Custom Feeds for Instagram', 'almaira-shop' ), 'active_filename' => 'instagram-feed/instagram-feed.php', ), 'one-click-demo-import' => array( 'name' => esc_html__( 'One Click Demo Import', 'almaira-shop' ), 'active_filename' => 'one-click-demo-import/one-click-demo-import.php', ), ) ); } endif; add_action( 'after_setup_theme', 'almaira_shop_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. */ /** * Register widget area. */ function almaira_shop_widgets_init(){ register_sidebar( array( 'name' => esc_html__( 'Primary Sidebar', 'almaira-shop' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here to appear in your primary sidebar.', 'almaira-shop' ), 'before_widget' => '
', 'before_title' => '