From 63a54335c7571dcb4e7e000bee09ef9b1ba7b327 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Wed, 16 Dec 2015 16:37:27 +0800 Subject: [PATCH] Fixed category access settings --- core/um-actions-access.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/um-actions-access.php b/core/um-actions-access.php index 5470aff9..b54ba294 100644 --- a/core/um-actions-access.php +++ b/core/um-actions-access.php @@ -63,7 +63,12 @@ add_action('um_access_category_settings','um_access_category_settings'); function um_access_category_settings() { global $post, $wp_query, $ultimatemember; - if ( is_single() || get_the_category() && ! is_front_page() && ! is_home() ) { + + if( is_front_page() || is_home() ){ + return; + } + + if ( is_single() || get_the_category() ) { $categories = get_the_category(); @@ -123,7 +128,7 @@ $post_id = get_option('woocommerce_shop_page_id'); - } else if ( is_archive() || is_front_page() || is_search() || in_the_loop() ) { + } else if ( is_archive() || is_front_page() || is_home() || is_search() || in_the_loop() ) { return;