Skip to content

Instantly share code, notes, and snippets.

@jordantrizz
Created December 17, 2019 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordantrizz/a403d77fb0fcfa89e5e678a33e7ced7a to your computer and use it in GitHub Desktop.
Save jordantrizz/a403d77fb0fcfa89e5e678a33e7ced7a to your computer and use it in GitHub Desktop.
Patching wp-snow-effect to work with WooCommerce
--- class-wp-snow-effect-public.php 2019-12-17 03:06:06.842908469 +0000
+++ class-wp-snow-effect-public.php.patch 2019-12-17 02:53:58.666773426 +0000
@@ -106,7 +106,9 @@
$show = true;
if (wp_is_mobile() && $this->settings['settings_show_on_mobile'] != 'mobile') $show = false;
if (is_home() && $this->settings['settings_show_on_home'] != 'home') $show = false;
- if (is_page() && $this->settings['settings_show_on_pages'] != 'pages') $show = false;
+ if (is_page() && $this->settings['settings_show_on_pages'] != 'pages') {
+ if(is_front_page() && $this->settings['settings_show_on_home'] = 'home') $show = true; else $show = false;
+ }
if (is_single() && $this->settings['settings_show_on_posts'] != 'posts') $show = false;
if (is_archive() && $this->settings['settings_show_on_archives'] != 'archives') $show = false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment