From f06332cc34fe2a23518d81fad9b2c295ceb0ca54 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 16 Apr 2019 13:50:02 -0400 Subject: [PATCH] excluding epicenter categories from the recent posts in the sidebar --- functions.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/functions.php b/functions.php index 1496f11..322a0a2 100644 --- a/functions.php +++ b/functions.php @@ -743,3 +743,14 @@ function fusion_doing_ajax() { } /* Omit closing PHP tag to avoid "Headers already sent" issues. */ +add_action('wp', 'check_home'); +function check_home() { + if(is_home() || is_category()) { + function modify_widget() { + $r = array( 'cat' => '-70'); + return $r; + } + + add_filter('widget_posts_args','modify_widget'); + } +} \ No newline at end of file -- 2.17.1