Update member side bar
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 5 Feb 2018 14:24:36 +0000 (09:24 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 5 Feb 2018 14:24:36 +0000 (09:24 -0500)
Don't show blog stuff in members only area

index.php
sidebar.php

index b01cfe0..5463585 100644 (file)
--- a/index.php
+++ b/index.php
@@ -25,7 +25,7 @@ get_header(); ?>
 
                 <main id="main" class="site-main small-12 columns" role="main">
 
-                    
+
 
                     <div class="news-wrapper">
 
@@ -35,8 +35,8 @@ get_header(); ?>
                             global $query_string;
                             query_posts($query_string . '&cat=-665');
                             /* Start the Loop */
-                            
-                            
+
+
                                 if (get_page_template_slug( $post->ID ) === "members-only-template.php") {  // Members only ?>
                                 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                                         <header class="entry-header">
@@ -65,7 +65,7 @@ get_header(); ?>
                                                             <?php endwhile; else:?>
                                                             <p><?php _e('Sorry, no posts yet');?></p>
                                                             <?php endif;?>
-                                                        </div> 
+                                                        </div>
                                                 <?php } else {
                                                     get_template_part('template-parts/glm-members-only-login-form');
                                                 } ?>
@@ -77,7 +77,7 @@ get_header(); ?>
                             </article><!-- #post-## -->
                         <?php } else { ?>
                                     <div class="post-page-title"><?php echo '<h1><a href="',get_the_permalink('34'),'">',get_the_title('34'),'</a></h1>'; ?></div>
-                                    
+
                                 <?php  if ( is_home() && ! is_front_page() ) : ?>
                                 <header>
                                     <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
@@ -85,9 +85,9 @@ get_header(); ?>
 
                             <?php
                             endif;
-                                    
+
                             if ( have_posts() ) :
-                              
+
                                 while ( have_posts() ) : the_post();
 
                                     /*
@@ -106,7 +106,7 @@ get_header(); ?>
 
                                 get_template_part( 'template-parts/content', 'none' );
 
-                            endif; 
+                            endif;
 
                                }?>
                     </div>
index 7f7d8ef..1d8d0b2 100644 (file)
@@ -13,7 +13,7 @@ if ( ! is_active_sidebar( 'sidebar-1' ) ) {
 ?>
 
 <aside id="secondary" class="widget-area" role="complementary">
-    
+
         <?php if ( get_page_template_slug( $post->ID ) === "members-only-template.php" && current_user_can("glm_members_member") ) {  // Members only ?>
             <section class="widget sidebar">
                 <h2 class="widget-title">Members Only Area</h2>
@@ -26,7 +26,6 @@ if ( ! is_active_sidebar( 'sidebar-1' ) ) {
             <?php echo the_ad_group(3058); // Members only ad group ?>
         <?php } else { ?>
             <?php if (! dynamic_sidebar('sidebar-top-ad')):endif; ?>
-        <?php } ?>
        <section class="widget sidebar">
 
             <h2 class="widget-title">Explore Posts</h2>
@@ -49,7 +48,7 @@ if ( ! is_active_sidebar( 'sidebar-1' ) ) {
 
        <?php dynamic_sidebar( 'sidebar-1' ); ?>
         <?php if ( is_blog() ) { ?>
-            <?php                                     
+            <?php
                 global $wpdb;
                 $term_ids = $wpdb->get_col("
                     SELECT DISTINCT term_taxonomy_id FROM $wpdb->term_relationships
@@ -86,6 +85,7 @@ if ( ! is_active_sidebar( 'sidebar-1' ) ) {
                     <?php } ?>
                 <?php } ?>
             <?php } ?>
+        <?php } ?>
 
        <?php dynamic_sidebar( 'sidebar-signup' ); ?>