Take epicenter blog widget reference from functions and add to sidebar
authorLaury GvR <laury@gaslightmedia.com>
Tue, 16 Apr 2019 18:20:00 +0000 (14:20 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 16 Apr 2019 18:20:00 +0000 (14:20 -0400)
functions.php
templates/sidebar-1.php

index 322a0a2..db02a50 100644 (file)
@@ -743,14 +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_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
+//         add_filter('widget_posts_args','modify_widget');
+//     } 
+// }
\ No newline at end of file
index fed14a6..478b6aa 100644 (file)
@@ -26,8 +26,15 @@ if (in_category(70)) {
                        }
        }
        if (is_home()) {
-               echo "Do stuff when is_home()";
+               echo "In cat 70 but also in home..";
+       }
+} else if (is_page(12465)) {
+       echo "Now we're on page 12465, Epicenter news";
+       function modify_widget() {
+               $r = array( 'cat' => '-70');
+               return $r;
        }
+       add_filter('widget_posts_args','modify_widget');
 } else {
        if (is_home()) {
                echo "Do stuff when is_home()";