From: Anthony Talarico Date: Tue, 16 Apr 2019 17:50:02 +0000 (-0400) Subject: excluding epicenter categories from the recent posts in the sidebar X-Git-Tag: v1.0.0^2~25 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=f06332cc34fe2a23518d81fad9b2c295ceb0ca54;p=WP-Themes%2Fmeetmtp.git excluding epicenter categories from the recent posts in the sidebar --- 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