From 664f7f4167fc564dd62a695673ea6d53972cab4b Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Tue, 27 Nov 2018 16:18:52 +0200 Subject: [PATCH] Revert "Revert "Basic WooCommere support"" This reverts commit fe11a69629f5065edf4e3dfcede824cada9264c3. --- functions.php | 29 +++++++++++++++++++++++++++++ style.css | 2 ++ 2 files changed, 31 insertions(+) diff --git a/functions.php b/functions.php index d096e3f..4ec1569 100644 --- a/functions.php +++ b/functions.php @@ -487,3 +487,32 @@ function origami_wp_header(){ } add_action('wp_head', 'origami_wp_header'); + +function origami_woocommerce_setup() { + + /** + * Add support for WooCommerce. + * @link https://docs.woocommerce.com/document/declare-woocommerce-support-in-third-party-theme/ + */ + add_theme_support( 'woocommerce' ); + + /** + * Add support for WooCommerce galleries. + * @link https://woocommerce.wordpress.com/2017/02/28/adding-support-for-woocommerce-2-7s-new-gallery-feature-to-your-theme/ + */ + add_theme_support( 'wc-product-gallery-slider' ); + add_theme_support( 'wc-product-gallery-lightbox' ); + add_theme_support( 'wc-product-gallery-zoom' ); + +} +add_action( 'after_setup_theme', 'origami_woocommerce_setup' ); + +/** + * Enqueue WooCommerce scripts and styles. + */ +function origami_woocommerce_scripts() { + + wp_enqueue_style( 'origami-woocommerce-style', get_template_directory_uri() . '/woocommerce.css', array(), SITEORIGIN_THEME_VERSION ); + +} +add_action( 'wp_enqueue_scripts', 'origami_woocommerce_scripts' ); diff --git a/style.css b/style.css index 6286770..735ab3f 100644 --- a/style.css +++ b/style.css @@ -1008,3 +1008,5 @@ h1.archive-title { .infinite-loader .spinner { left: 50% !important; } + +/*# sourceMappingURL=sass/maps/style.css.map */