moving entire members only content inside of conditional
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 25 May 2017 16:58:23 +0000 (12:58 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 25 May 2017 16:58:23 +0000 (12:58 -0400)
only display members only sidebar if they pass the members only conditional, parts of the
sidebar were showing prebviously even if they weren't logged in

sidebar.php

index 70ffbe3..85de1c2 100644 (file)
@@ -1,11 +1,10 @@
 <?php if (get_page_template_slug( $post->ID ) === "members-only-template.php") {  ?>
-    <div id="members-only-sidebar" class="show-for-medium-up opensearchserver.ignore">
-        <div class="row collapse">
-            <h4 class="text-center"> Members Only</h4>
-            <?php if (current_user_can("glm_members_member")) { ?>
-                 <?php glm_theme_top_bar('members-only-menu'); ?>
-            <?php } ?>
+    <?php if (current_user_can("glm_members_member")) { ?>
+        <div id="members-only-sidebar" class="show-for-medium-up opensearchserver.ignore">
+            <div class="row collapse">
+                <h4 class="text-center"> Members Only</h4>
+                     <?php glm_theme_top_bar('members-only-menu'); ?>
+             </div>
         </div>
-    </div>
-
+    <?php } ?>
 <?php } ?>
\ No newline at end of file