Separated blog sections for members and non-members
authorLaury GvR <laury@gaslightmedia.com>
Mon, 17 Jul 2017 17:52:36 +0000 (13:52 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Mon, 17 Jul 2017 17:52:36 +0000 (13:52 -0400)
Instead of using categories to separate the two blog sections we've
 decided to use a custom post type (member_post). I was able to
 reuse some of the custom post declaration that Steve put together
 for Trout Creek. The client can add member posts through an admin
 menu just below the regular posts menu, and this has its own set
 of categories that won't be visible to non-members. This also
 means Categories can be displayed again, so these are currently
 not hidden from the sidebar (but can be if still desired.)

Single posts, archives, home, and categories listings are all
 separated based on whether they are in the member section, and
 each shows a different sidebar. This sidebar has items based on
 whether or not one is in the member section. The search
 functionality also had to be separated, so that a Member search
 would not produce a regular Post result, and vice versa. The
 Search template therefore also had to be customized.

20 files changed:
archive.php
css/app.css
functions.php
glm-members-only-template.php
home.php
parts/blog-addthis-wrapper.php [new file with mode: 0644]
parts/blog-archive-content.php
parts/blog-sidebar-members-only.php
parts/blog-sidebar-r.php
parts/blog-single-content.php [new file with mode: 0644]
parts/client-info-footer.php
parts/glm-members-only-blog-feed.php [new file with mode: 0644]
parts/members-sidebar.php
parts/search-content.php [new file with mode: 0644]
scss/_blog.scss
scss/_copyright.scss
scss/_main.scss
scss/plugins/_glm-member-db.scss
search.php
single.php

index 19aea22..71e8ee6 100644 (file)
@@ -6,29 +6,28 @@
     <div class="row">
 
         <?php $category = null;
-            if ( get_query_var( 'cat' ) ) {
-                $category = get_category( get_query_var( 'cat' ) );
-            } ?>
+        if ( get_query_var( 'cat' ) ) {
+            $category = get_category( get_query_var( 'cat' ) );
+        } ?>
 
-            <?php if ( $category && $category->slug == 'members-only' ) { ?>
-                <?php if (current_user_can("glm_members_member")) { ?>
-                    <!-- If user is logged in as a member, display top bar, bread crumbs, & content -->
-                    <div id="blog-posts-over" class="small-12 medium-8 columns">
-                        <?php get_template_part('parts/glm-members-only-top-bar'); ?>
-                        <?php get_template_part('parts/blog-archive-content'); ?>
-                    </div>
-                    <?php get_template_part('parts/blog-sidebar-members-only'); ?>
-                    <?php //get_template_part('parts/interior-footer'); ?>
-                <?php } else { ?>
-                    <!-- Otherwise, display main members only page content & form -->
-                    <?php get_template_part('parts/glm-members-only-login-form'); ?>
-                <?php } ?>
-            <?php } else {?> <!-- not members-only category -->
+        <?php if ( ( is_tax( "member-post-category" ) ) || ( $category && $category->slug == 'members-only' ) || ( ( isset( $_GET["post_type"] ) ) && ( "member_post" == $_GET["post_type"] ) ) ) { ?>
+            <?php if (current_user_can("glm_members_member")) { ?>
+                <!-- If user is logged in as a member, display top bar, bread crumbs, & content -->
                 <div id="blog-posts-over" class="small-12 medium-8 columns">
+                    <?php get_template_part('parts/glm-members-only-top-bar'); ?>
                     <?php get_template_part('parts/blog-archive-content'); ?>
                 </div>
-                <?php get_template_part('parts/blog-sidebar-r'); ?>
-            <?php }?>
-        </div>
+                <?php get_template_part('parts/blog-sidebar-members-only'); ?>
+                <?php //get_template_part('parts/interior-footer'); ?>
+            <?php } else { ?>
+                <!-- Otherwise, display main members only page content & form -->
+                <?php get_template_part('parts/glm-members-only-login-form'); ?>
+            <?php } ?>
+        <?php } else {?> <!-- not members-only category -->
+            <div id="blog-posts-over" class="small-12 medium-8 columns">
+                <?php get_template_part('parts/blog-archive-content'); ?>
+            </div>
+            <?php get_template_part('parts/blog-sidebar-r'); ?>
+        <?php }?>
     </div>
     <?php get_footer(); ?>
index e8a3cad..f0994fa 100644 (file)
@@ -7025,7 +7025,7 @@ main .blocks .block-thumb-wrap {
       max-height: 170px; } }
 main .blocks .block {
   margin-bottom: 80px;
-  transition: all 0.2s ease in out; }
+  transition: all 0.2s ease-in-out; }
   main .blocks .block img {
     border: none;
     padding: 0; }
@@ -7070,23 +7070,25 @@ main.page-front {
     main.page-front {
       margin: 0 auto; } }
   main.page-front #main-content {
-    margin-top: 25px; }
-    main.page-front #main-content h1 {
-      padding: 0;
-      width: 100%;
-      display: block;
-      text-align: center;
-      font-weight: 600;
-      font-size: 21px;
-      line-height: 40px;
-      letter-spacing: 2px;
-      text-transform: uppercase;
-      color: #212121;
-      font-family: "ingram-wide-2"; }
-    main.page-front #main-content p {
-      color: #888888;
-      font-family: "ingram-wide-2";
-      font-size: 18px; }
+    margin-top: 25px;
+    /*            h1 {
+                padding: 0;
+                width: 100%;
+                display: block;
+                text-align: center;
+                font-weight: 600;
+                font-size: 21px;
+                line-height: 40px;
+                letter-spacing: 2px;
+                text-transform: uppercase;
+                color: #212121;
+                font-family: "ingram-wide-2";
+            }*/
+    /*            p {
+                color: $dark-grey;
+                font-family: "ingram-wide-2";
+                font-size: 18px;
+            }*/ }
   main.page-front #mid {
     background: url(../assets/central-swing-full-image.jpg);
     background-size: cover;
@@ -7679,39 +7681,46 @@ body #glm-member-detail-container #glm-package-detail-member-name h3 {
 body #glm-member-detail-container #glm-package-detail-member-name a:hover {
   color: white;
   text-decoration: underline; }
-body .members-only-template #menu-side h2 a {
+body main.members-only-template #menu-side h2 a {
   color: white;
   font-size: 1.875rem;
   font-family: "ingram-wide-2"; }
-  body .members-only-template #menu-side h2 a:hover {
+  body main.members-only-template #menu-side h2 a:hover {
     border-bottom: 1px solid white; }
-body .members-only-template #side-links {
+body main.members-only-template #side-links {
   background-color: #b32024;
   border: 1px solid #ffc742;
   border-radius: 5px;
   color: #ffc742;
   list-style: outside none none;
   padding: 20px; }
-body .members-only-template #menu-members-only-menu {
+body main.members-only-template #menu-members-only-menu {
   list-style: outside none none; }
-body .members-only-template #side-links h2 {
+body main.members-only-template #side-links h2 {
   color: #FFFFFF; }
-body .members-only-template #side-links li {
+body main.members-only-template #side-links li {
   line-height: 1;
   margin-bottom: 10px; }
-body .members-only-template #side-links li a {
+body main.members-only-template #side-links li a {
   color: #FFFFFF;
   text-decoration: none;
   font-size: 18px; }
-body .members-only-template #side-links li a:hover {
+body main.members-only-template #side-links li a:hover {
   color: #ffc742;
   border-bottom: 1px solid #ffc742; }
+body main.members-only-template .blocks .block {
+  margin-bottom: 50px; }
+body main.members-only-template .blog-feed-post {
+  margin-bottom: 20px; }
 body #glm-member-front-header {
   border-bottom: 1px solid lightgrey;
   margin: 5px 10px 10px;
   padding: 10px; }
 body #glm-member-front-header .glm-button.button {
   background-color: #b32024; }
+  @media only screen and (min-width:0em) and (max-width:64em) {
+    body #glm-member-front-header .glm-button.button {
+      clear: right; } }
 body #glm-member-front-header .glm-member-greeting {
   float: left;
   padding: 6px; }
@@ -7875,13 +7884,17 @@ body #glm-member-front-header .button.glm-button {
     color: #FFFFFF; }
 
 #blog-posts-over article {
-  padding-top: 10px;
-  margin-bottom: 15px;
+  padding-top: 0;
+  margin-bottom: 25px;
   display: inline-block;
-  width: 100%; }
+  width: 100%;
+  font-size: 16px;
+  line-height: 1.5; }
+  #blog-posts-over article h1 {
+    line-height: 1; }
   #blog-posts-over article p {
     padding-bottom: 15px;
-    font-size: 18px; }
+    font-size: 16px; }
   #blog-posts-over article a.read-more {
     color: #FFFFFF;
     background: #ffc742;
@@ -7902,6 +7915,10 @@ body #glm-member-front-header .button.glm-button {
       font-size: 0.75rem;
       color: #939598;
       margin: 0 0 12px; }
+  #blog-posts-over article hr.contentBreak {
+    margin: 5px 0; }
+  #blog-posts-over article .blog-feed-imgs img {
+    border-radius: 2px; }
 
 #blog-posts-over.ai1ec-post article {
   /*background-color: rgba(255, 140,140, 0.2);*/
@@ -7917,7 +7934,7 @@ body #glm-member-front-header .button.glm-button {
   color: #757575;
   font-size: 12px; }
 
-.blog-home #blog-posts-over > div {
+.blog-archive #blog-posts-over > div, .blog-home #blog-posts-over > div {
   margin: 25px 0; }
 
 #blog-side-info {
@@ -8288,7 +8305,8 @@ img#orb-foot {
     font-size: 0.75rem; }
   #copyright a {
     color: lightgrey;
-    text-decoration: underline; }
+    text-decoration: underline;
+    font-size: 0.875rem; }
 
 #footer_address span.bullet, #copyright span.bullet {
   margin: 0 5px; }
index 7f6fa3b..bcac5a4 100644 (file)
@@ -561,4 +561,145 @@ add_action( 'after_setup_theme', 'woocommerce_support' );
 function woocommerce_support() {
     add_theme_support( 'woocommerce' );
 }
+
+define( 'POST_TYPE', 'member_post' );
+define( 'MEMBER_POST_SINGLE', 'Member Post' );
+define( 'MEMBER_POST_PLURAL', 'Member Posts' );
+define( 'TEXT_DOMAIN', 'tc_member_posts' );
+define( 'CATEGORY_NAME', 'Member Post Category' );
+define( 'CATEGORY_SLUG', 'member-post-category' );
+define( 'CATEGORY_SINGLE', 'Member Post Category' );
+define( 'CATEGORY_PLURAL', 'Member Post Categories' );
+
+// Add images sizes for the CPT
+add_image_size( 'memberPostSize', '395', '258', true );
+
+// Register Custom Post Type
+/**
+ * troutcreek_custom_post_type
+ *
+ * @access public
+ * @return void
+ */
+function member_post_custom_post_type()
+{
+
+    $labels = array(
+        'name'                  => _x( MEMBER_POST_PLURAL, 'Post Type General Name', TEXT_DOMAIN ),
+        'singular_name'         => _x( MEMBER_POST_SINGLE, 'Post Type Singular Name', TEXT_DOMAIN ),
+        'menu_name'             => __( MEMBER_POST_PLURAL, TEXT_DOMAIN ),
+        'name_admin_bar'        => __( MEMBER_POST_PLURAL, TEXT_DOMAIN ),
+        'archives'              => __( MEMBER_POST_PLURAL, TEXT_DOMAIN ),
+        'attributes'            => __( MEMBER_POST_SINGLE . ' Attributes', TEXT_DOMAIN ),
+        'parent_item_colon'     => __( 'Parent ' . MEMBER_POST_SINGLE . ':', TEXT_DOMAIN ),
+        'all_items'             => __( 'All ' . MEMBER_POST_PLURAL, TEXT_DOMAIN ),
+        'add_new_item'          => __( 'Add New ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ),
+        'add_new'               => __( 'Add New ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ),
+        'new_item'              => __( 'New ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ),
+        'edit_item'             => __( 'Edit ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ),
+        'update_item'           => __( 'Update ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ),
+        'view_item'             => __( 'View ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ),
+        'view_items'            => __( 'View ' . MEMBER_POST_PLURAL, TEXT_DOMAIN ),
+        'search_items'          => __( 'Search ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ),
+        'not_found'             => __( 'Not found', TEXT_DOMAIN ),
+        'not_found_in_trash'    => __( 'Not found in Trash', TEXT_DOMAIN ),
+        'featured_image'        => __( 'Member Post Image', TEXT_DOMAIN ),
+        'set_featured_image'    => __( 'Set member post image', TEXT_DOMAIN ),
+        'remove_featured_image' => __( 'Remove member post image', TEXT_DOMAIN ),
+        'use_featured_image'    => __( 'Use as member post image', TEXT_DOMAIN ),
+        'insert_into_item'      => __( 'Insert into ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ),
+        'uploaded_to_this_item' => __( 'Uploaded to this ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ),
+        'items_list'            => __( MEMBER_POST_PLURAL . ' list', TEXT_DOMAIN ),
+        'items_list_navigation' => __( MEMBER_POST_PLURAL . ' list navigation', TEXT_DOMAIN ),
+        'filter_items_list'     => __( 'Filter items list', TEXT_DOMAIN ),
+    );
+    $args = array(
+        'label'                 => __( MEMBER_POST_SINGLE, TEXT_DOMAIN ),
+        'description'           => __( 'Custom', MEMBER_POST_PLURAL ),
+        'labels'                => $labels,
+        'supports'              => array( 'title', 'editor', 'excerpt', 'thumbnail', 'thumbnails','post-thumbnails', 'page-attributes' ),
+        'taxonomies'            => array( CATEGORY_SLUG ),
+        'hierarchical'          => false,
+        'public'                => false,
+        'show_ui'               => true,
+        'show_in_menu'          => true,
+        'menu_position'         => 5,
+        'show_in_admin_bar'     => true,
+        'show_in_nav_menus'     => true,
+        'can_export'            => true,
+        'has_archive'           => true,
+        'exclude_from_search'   => false,
+        'publicly_queryable'    => true,
+        'capability_type'       => 'page',
+    );
+    register_post_type( POST_TYPE, $args );
+    register_taxonomy_for_object_type( CATEGORY_NAME, POST_TYPE );
+
+}
+add_action( 'init', 'member_post_custom_post_type', 0 );
+/**
+ * member_post_taxonomies
+ *
+ * @access public
+ * @return void
+ */
+function member_post_taxonomies()
+{
+
+    // Categories
+    $labels = array(
+        'name'              => _x( CATEGORY_NAME, 'taxonomy general name' ),
+        'singular_name'     => _x( CATEGORY_NAME, 'taxonomy singular name' ),
+        'search_items'      => __( 'Search ' . CATEGORY_PLURAL),
+        'all_items'         => __( 'All ' . CATEGORY_PLURAL),
+        'parent_item'       => __( 'Parent ' . CATEGORY_SINGLE),
+        'parent_item_colon' => __( 'Parent ' . CATEGORY_SINGLE),
+        'edit_item'         => __( 'Edit ' . CATEGORY_SINGLE),
+        'update_item'       => __( 'Update ' . CATEGORY_SINGLE),
+        'add_new_item'      => __( 'Add New ' . CATEGORY_SINGLE),
+        'new_item_name'     => __( 'New ' . CATEGORY_SINGLE . ' Name' ),
+        'menu_name'         => __(  CATEGORY_SINGLE ),
+    );
+
+    $capabilities = array(
+        'manage_terms' => 'manage_categories',
+        'edit_terms'   => 'manage_categories',
+        'delete_terms' => 'manage_categories',
+        'assign_terms' => 'edit_posts',
+    );
+
+    $args = array(
+        'label'                => __(CATEGORY_PLURAL),
+        'rewrite'              => array( 'slug' => CATEGORY_SLUG ),
+        'capabilities'         => $capabilities,
+        'public '              => false,
+        'show_in_quick_edit'   => true,
+        'show_in_admin_column' => true,
+        'hierarchical'         => true
+    );
+
+    register_taxonomy(
+        CATEGORY_SLUG,
+        POST_TYPE,
+        $args
+    );
+}
+
+add_action( 'init', 'member_post_taxonomies' );
+add_action( 'init', 'member_post_custom_post_type' );
+add_theme_support( 'post-thumbnails', array('member_post') );
+
+function template_chooser($template)
+{
+//  global $wp_query;
+//  $post_type = get_query_var('searchType');
+//  $post_type = 'searchType';
+//  if( $wp_query->is_search && 'searchType' == $post_type )
+//  {
+//    return locate_template('search-member-post.php');  //  redirect to search-member-post.php
+//  }
+  return $template;
+}
+add_filter('template_include', 'template_chooser');
+
 ?>
index cd06209..5004982 100644 (file)
@@ -34,6 +34,7 @@ Template Name: GLM Members Only Template
                                 <?php get_template_part('parts/glm-blocks-members-only'); ?>
                             </div>
                         <?php } ?>
+                    <?php get_template_part('parts/glm-members-only-blog-feed'); ?>
                     <?php } ?>
                 <?php } else if (get_the_ID() == get_option("glm_members_database_option_members_only_id")) {?>
                     <!-- Otherwise, if it's the main members only page, display content & form -->
index 248e8d5..1fb9c60 100644 (file)
--- a/home.php
+++ b/home.php
@@ -7,19 +7,40 @@
         <div id="blog-posts-over" class="small-12 medium-8 columns">
             <?php if(have_posts()) : while(have_posts()): the_post();?>
             <div class="row content blog-posts-container">
-                <div class="small-11 small-centered columns">
-                    <article id="<?php the_ID()?>" <?php post_class()?>>
+              <!--  <div class="small-11 small-centered columns"> -->
+                <?php $thumbnail = get_the_post_thumbnail($post->ID, 'blog-feed-front'); ?>
+
+                <?php if ($thumbnail) { ?>
+                <div class="small-12 medium-4 columns text-center blog-feed-imgs">
+                    <?php echo $thumbnail; ?>
+                </div>
+                <div class="small-12 medium-8 columns blog-feed-contents">
+                    <?php } else { ?>
+                    <div class="small-12 columns blog-feed-content">
+                        <?php } ?>
+
+                        <article id="<?php the_ID()?>" <?php post_class()?>>
+
                         <header class="entry-header">
                             <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
-                            <span class="meta date"><?php the_time('F jS, Y') ?></span>
                         </header>
-                        <?php echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
+
+                        <?php echo the_advanced_excerpt('length=200&length_type=characters&no_custom=1&ellipsis=%26hellip;&exclude_tags=a,img,p,div,h1,h2,h3,h4,h5,h6'); ?>
+                        <!--the_advanced_excerpt('length=200&length_type=words&no_custom=1&ellipsis=%26hellip;');-->
+                        <!-- This could be wrapped in php tags and be functional,
+                                but it is easier to change this in admin side-->
+                        <hr class="contentBreak">
+                        <div class="blog-excerpt-date">
+                            <span class="meta date">Posted on <strong><?php the_time('F jS, Y') ?></strong></span>
+                        </div>
+
                     </article>
                 </div>
             </div>
             <?php endwhile; ?>
             <div class="navigation">
-                <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
+                <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span>
+                <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
             </div><!-- /.navigation -->
             <?php else: ?>
             <div id="post-404" class="noposts">
@@ -28,9 +49,5 @@
             <?php endif;?>
         </div>
         <?php get_template_part('parts/blog-sidebar-r'); ?>
-        <?php //get_template_part('parts/interior-footer'); ?>
     </div>
-    <?php get_footer(); ?>
-
-
-
+    <?php get_footer(); ?>
\ No newline at end of file
diff --git a/parts/blog-addthis-wrapper.php b/parts/blog-addthis-wrapper.php
new file mode 100644 (file)
index 0000000..92a83af
--- /dev/null
@@ -0,0 +1,10 @@
+<div id="addthis_wrapper">
+    <!-- AddThis Button BEGIN -->
+    <div class="addthis_toolbox addthis_default_style">
+        <a class="addthis_counter addthis_pill_style"></a>
+    </div>
+    <script type="text/javascript">var addthis_config = {"data_track_addressbar":false};</script>
+    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5135fe4558d287a9"></script>
+<!--    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>-->
+        <!-- AddThis Button END -->
+</div><!--/#addthis_wrapper-->
\ No newline at end of file
index 60b693f..81b4439 100644 (file)
@@ -1,18 +1,38 @@
                     <?php if(have_posts()) : while(have_posts()): the_post();?>
                     <div class="row content blog-posts-container">
-                        <div class="small-11 small-centered columns">
-                            <article id="<?php the_ID()?>" <?php post_class()?>>
+                      <!--  <div class="small-11 small-centered columns"> -->
+                        <?php $thumbnail = get_the_post_thumbnail($post->ID, 'blog-feed-front'); ?>
+                        <?php if ($thumbnail) { ?>
+                        <div class="small-12 medium-4 columns text-center blog-feed-imgs">
+                            <?php echo $thumbnail; ?>
+                        </div>
+                        <div class="small-12 medium-8 columns blog-feed-contents">
+                            <?php } else { ?>
+                            <div class="small-12 columns blog-feed-content">
+                                <?php } ?>
+
+                                <article id="<?php the_ID()?>" <?php post_class()?>>
+
                                 <header class="entry-header">
                                     <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
-                                    <span class="meta date"><?php the_time('F jS, Y') ?></span>
                                 </header>
-                                <?php echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
+
+                                <?php echo the_advanced_excerpt('length=200&length_type=characters&no_custom=1&ellipsis=%26hellip;&exclude_tags=a,img,p,div,h1,h2,h3,h4,h5,h6'); ?>
+                                <!--the_advanced_excerpt('length=200&length_type=words&no_custom=1&ellipsis=%26hellip;');-->
+                                <!-- This could be wrapped in php tags and be functional,
+                                        but it is easier to change this in admin side-->
+                                <hr class="contentBreak">
+                                <div class="blog-excerpt-date">
+                                    <span class="meta date">Posted on <strong><?php the_time('F jS, Y') ?></strong></span>
+                                </div>
+
                             </article>
                         </div>
                     </div>
                     <?php endwhile; ?>
                     <div class="navigation">
-                        <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
+                        <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span>
+                        <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
                     </div><!-- /.navigation -->
                     <?php else: ?>
                     <div id="post-404" class="noposts">
index 690970d..a583b85 100644 (file)
@@ -1,41 +1,40 @@
         <div id="blog-side-info-wrapper" class="small-11 small-only-text-center medium-4 columns">
             <div id="blog-side-info">
                 <form id="searchform" action="<?php echo esc_url( home_url() ); ?>" method="get">
-                    <div><input id="s" class="text" type="text" name="s" value="" />
+                    <div><input id="s" class="text" type="text" name="s" value="" placeholder="Search Members Only" />
                     <input class="submit blogbutton" type="submit" name="submit" value="Search" />
-                    <input type="hidden" name="searchType" value="blog" /> </div>
+                    <input type="hidden" name="searchType" value="member_post" /> </div>
                 </form>
                 <h3>Recent Posts</h3>
                 <ul>
                 <?php
-                    $category = get_term_by('slug', 'members-only', 'category');
-                    $args = array( 'numberposts' => '5', 'post_status' => 'publish', 'category_name' => 'members-only' );
+
+                    $args = array( 'numberposts' => '5', 'post_status' => 'publish', 'post_type' => 'member_post' );
                     $recent_posts = wp_get_recent_posts( $args );
                     foreach( $recent_posts as $recent ){
                         echo '<li><a href="' . get_permalink($recent["ID"]) . '">' .   $recent["post_title"].'</a> </li> ';
                     }
                 ?>
                 </ul>
-                <h3>Categories</h3>
-                <ul>
-                    <?php
-                    $args = array(
-                    'orderby' => 'name',
-                    'order' => 'ASC',
-                    'category_name' => 'members-only'
-                    );
-                  $categories = get_categories($args);
-                    foreach($categories as $category) {
-                        if ( $category->slug == "members-only") {
-                            echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';
+                <?php
+                    $cats = get_terms( array(
+                        'taxonomy' => 'member-post-category',
+                        'hide_empty' => false,
+                    ) );
+                    if ( count($cats) > 0 ) {
 
-                        }
-                    }
-                    ?>
-                </ul>
-                <h3>Archive</h3>
-                <ul><?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12 ) ); ?></ul>
+                ?>
 
+                    <h3>Categories</h3>
+                    <ul>
+                        <?php
+                            foreach($cats as $cat) {
+                                echo '<li><a href="' . get_category_link( $cat->term_id ) . '" title="' . sprintf( __( "View all member posts in %s" ), $cat->name ) . '" ' . '>' . $cat->name.'</a> </li> ';
+                           }
+                        ?>
+                    </ul>
+                <?php } ?>
+                <h3>Archive</h3>
+                <ul><?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12, 'post_type' => 'member_post' ) ); ?></ul>
             </div>
-
         </div>
\ No newline at end of file
index 540692e..c00ac2d 100644 (file)
@@ -9,7 +9,7 @@
                 <ul>
                 <?php
                     $members_only_category = get_term_by('slug', 'members-only', 'category');
-                    $args = array( 'numberposts' => '5', 'post_status' => 'publish', 'category__not_in' => $members_only_category->term_id );
+                    $args = array( 'numberposts' => '5', 'post_status' => 'publish', 'post_type' => 'post' );
                     $recent_posts = wp_get_recent_posts( $args );
                     foreach( $recent_posts as $recent ){
                             echo '<li><a href="' . get_permalink($recent["ID"]) . '">' .   $recent["post_title"].'</a> </li> ';
                 <h3>Categories</h3>
                 <ul>
                     <?php
-                    $args = array(
-                    'orderby' => 'name',
-                    'order' => 'ASC'
-                    );
-                  $categories = get_categories($args);
+                    $args = array('orderby' => 'name', 'order' => 'ASC', 'post_type' => 'post' );
+                    $categories = get_categories($args);
                     foreach($categories as $category) {
-                        if ($category->term_id !== $members_only_category->term_id ) {
-                            echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';
-                        }
+                        echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';
                     }
                     ?>
                 </ul>
                 <h3>Archive</h3>
-                <ul><?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12 ) ); ?></ul>
+                <ul><?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12, 'post_type' => 'post' ) ); ?></ul>
 
             </div>
         </div>
\ No newline at end of file
diff --git a/parts/blog-single-content.php b/parts/blog-single-content.php
new file mode 100644 (file)
index 0000000..cebca5f
--- /dev/null
@@ -0,0 +1,55 @@
+         <?php if(have_posts()) : while(have_posts()): the_post();?>
+            <div class="row blog-post-container">
+                <div class="small-11 small-centered columns">
+                    <div class="row">
+                        <div class="small-12 columns">
+                            <article id="<?php the_ID()?>" <?php post_class()?>>
+                                <header class="entry-header">
+                                    <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
+                                    <?php if ( has_post_thumbnail() ):?>
+                                        <div class="featured-image-wrap"><?php the_post_thumbnail("large"); ?></div>
+                                    <?php endif; ?>
+                                    <span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
+                                </header>
+                                <?php echo the_content(); ?>
+                            </article>
+                                <?php //comments_template(); ?>
+<!--                                    <footer class="entry-meta small-12 medium-6 medium-push-3 center">-->
+                                    <?php // $post_categories = wp_get_post_categories( get_the_ID() );
+//                                    $cats = array();
+//                                        echo 'This entry was posted ';
+//                                        if (has_category()) {
+//                                            echo 'in ';
+//                                            foreach($post_categories as $c){
+//                                                $cat = get_category( $c );
+//                                                $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
+//                                                echo '<a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>, ';
+//                                            }
+//                                        }
+//                                        $post_tags = wp_get_post_tags( get_the_ID() );
+//                                        $tags = array();
+//                                        if (has_tag( )) {
+//                                            echo ' and tagged ';
+//                                            foreach($post_tags as $t){
+//                                                $tag = get_tag( $t );
+//                                                $tags[] = array( 'name' => $tag->name, 'slug' => $tag->slug );
+//                                                echo '<a rel="category" title="View all posts in '. $tag->name . ' " href="'. $tag->slug .'">'. $tag->name .'</a>, ';
+//                                            }
+//                                        }
+//                                        echo ' on ';
+//                                        echo ' <span class="meta date"> ' . the_time('F jS, Y') . '</span>';
+//                                        ?>
+<!--                                    </footer>-->
+                            </article>
+                        </div>
+                    </div>
+                </div>
+
+
+            </div>
+            <?php endwhile; ?>
+            <?php else: ?>
+            <div id="post-404" class="noposts">
+                <p><?php _e('Sorry, no results were found.');?></p>
+            </div><!-- /#post-404 -->
+            <?php endif;?>
\ No newline at end of file
index cf1ac88..53db9ca 100644 (file)
@@ -46,7 +46,7 @@
         <?php $contactPage = get_post(3038);?>
         <?php if($contactPage):?>
         <span class="bullet"> &#124; </span><span><a href="<?php echo get_page_link($contactPage->ID);?>">Contact Us</a></span>
-        <span class="bullet"> &#124; </span><span><a href="<?php echo get_page_link(get_option('glm_members_database_option_members_only_id')); ?>">Members Only</a></span>
+        <span class="bullet"> &#124; </span><span><a href="<?php echo get_permalink('members-only'); ?>">Members Only</a></span>
         <?php endif;?>
     </div>
 
diff --git a/parts/glm-members-only-blog-feed.php b/parts/glm-members-only-blog-feed.php
new file mode 100644 (file)
index 0000000..1fd7c19
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+$args = array (
+
+    'cat' => array(1),
+    'posts_per_page' => -1, //showposts is deprecated
+    'orderby' => 'date' //You can specify more filters to get the data
+);
+
+
+?>
+<?php
+$category = get_term_by('slug', 'members-only', 'category');
+$args = array( 'posts_per_page' => '5', 'post_status' => 'publish', 'category_name' => 'members-only' );
+$lastposts = get_posts( $args );
+if ($lastposts) { ?>
+
+        <div id="blog-feed-front">
+            <div class="row">
+            <?php foreach($lastposts as $post) : setup_postdata($post); ?>
+
+                <div class="small-12 columns blog-feed-post">
+                    <?php $thumbnail = get_the_post_thumbnail($post->ID, 'blog-feed-front'); ?>
+                    <?php if ($thumbnail) { ?>
+                        <div class="small-8 small-centered medium-uncentered medium-4 columns blog-feed-img">
+                                <?php echo $thumbnail; ?>
+                                <img alt="post shadow" class="post-shadow" src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/post-image-shadow.jpg">
+                        </div>
+                        <div class="small-12 medium-8 columns blog-feed-content">
+                    <?php } else { ?>
+                        <div class="small-12 columns blog-feed-content">
+                    <?php } ?>
+                            <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
+                            <p class="blog-feed-date"><?php echo get_the_date('F j, Y', $post->ID); ?></p>
+                            <p><?php echo the_advanced_excerpt('length=200&length_type=characters&no_custom=1&ellipsis=%26hellip;&exclude_tags=img,p,strong,div'); ?></p>
+                    </div>
+                </div>
+            <?php endforeach; ?>
+            </div>
+        </div>
+<?php } ?>
index a73e598..fe133f9 100644 (file)
@@ -6,6 +6,5 @@
             <?php glm_members_only_menu(); ?>
         <?php } ?>
     <?php } ?>
-    <?php $category = get_term_by('slug', 'members-only', 'category'); ?>
-    <h2><a href="<?php echo get_term_link($category); ?>">True North News</a></h2>
+    <h2><a href="<?php echo get_home_url(null, "/?post_type=member_post"); ?>">True North News</a></h2>
 </div>
\ No newline at end of file
diff --git a/parts/search-content.php b/parts/search-content.php
new file mode 100644 (file)
index 0000000..47d8ff1
--- /dev/null
@@ -0,0 +1,110 @@
+
+        <?php if (get_search_query() == "") { ?>
+        <br><h2 class="search-result-header small-12 columns">Please enter a query in the search box. </h2>
+        <?php } else { ?>
+        <br><h2 class="search-result-header small-12 columns">Search Results for "<?php echo get_search_query(); ?>"</h2>
+        <div id="blog-posts-over" class="small-12 columns">
+                <?php if(have_posts()) : while(have_posts()): the_post();?>
+
+
+                <?php if (is_search() && (isset($_GET['searchType']) && $_GET['searchType'] == 'blog') && (($post->post_type=='page') || ($post->post_type=='member_post'))) {
+                    continue;
+                } ?>
+                <?php if (is_search() && (isset($_GET['searchType']) && $_GET['searchType'] == 'member_post') && (($post->post_type=='page') || ($post->post_type=='post'))) {
+                    continue;
+                } ?>
+            <div class="row content search-result-container">
+                <div class="small-11 small-centered columns">
+                    <article id="<?php the_ID()?>" <?php post_class()?>>
+                        <header class="entry-header">
+                            <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
+                            <span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
+                        </header>
+
+
+                <!-- Start of the Contextual/Highlight Search -->
+                                <?php
+                                // Configuration
+                                $max_length = 400; // Max length in characters
+                                $min_padding = 30; // Min length in characters of the context to place around found search terms
+
+                                // Load content as plain text
+                                global $wp_query, $post;
+                                $content = (!post_password_required($post) ? strip_tags(preg_replace(array("/\r?\n/", '@<\s*(p|br\s*/?)\s*>@'), array(' ', "\n"), apply_filters('the_content', $post->post_content))) : '');
+
+                                // Search content for terms
+                                $terms = $wp_query->query_vars['search_terms'];
+                                if ( preg_match_all('/'.str_replace('/', '\/', join('|', $terms)).'/i', $content, $matches, PREG_OFFSET_CAPTURE) ) {
+                                    $padding = max($min_padding, $max_length / (2*count($matches[0])));
+
+                                  // Construct extract containing context for each term
+                                  $output = '';
+                                  $last_offset = 0;
+                                  foreach ( $matches[0] as $match ) {
+                                    list($string, $offset) = $match;
+                                    $start  = $offset-$padding;
+                                    $end = $offset+strlen($string)+$padding;
+                                    // Preserve whole words
+                                    while ( $start > 1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$start-1}) ) $start--;
+                                    while ( $end < strlen($content)-1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$end}) ) $end++;
+                                    $start = max($start, $last_offset);
+                                    $context = substr($content, $start, $end-$start);
+                                    if ( $start > $last_offset ) $context = '...'.$context;
+                                    $output .= $context;
+                                    $last_offset = $end;
+                                  }
+
+                                  if ( $last_offset != strlen($content)-1 ) $output .= '...';
+                                } else {
+                                  $output = $content;
+                                }
+
+                                if ( strlen($output) > $max_length ) {
+                                  $end = $max_length-3;
+                                  while ( $end > 1 && preg_match('/[A-Za-z0-9\'"-]/', $output{$end-1}) ) $end--;
+                                  $output = substr($output, 0, $end) . '...';
+                                }
+
+                                // Highlight matches
+                                $context = nl2br(preg_replace('/'.str_replace('/', '\/', join('|', $terms)).'/i', '<strong>$0</strong>', $output));
+                                ?>
+
+                                <p class="search_result_context">
+                                  <?php echo $context ?>
+                                </p>
+                                <p>
+                                  <a href="<?php the_permalink() ?>" rel="bookmark">Read this entry</a>
+                                </p>
+                <!-- End of the Contextual/Highlight Search -->
+
+                        <?php //echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
+                        <footer class="entry-meta small-12 medium-6 medium-push-3 center">
+                            <?php
+                            if (has_category()) {
+                                $post_categories = wp_get_post_categories( get_the_ID() );
+                                $cats = array();
+                                echo 'This entry was posted ';
+                                echo 'in';
+                                foreach($post_categories as $c){
+                                    $cat = get_category( $c );
+                                    $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
+                                    echo ', <a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>';
+                                }
+                                echo '.';
+                            }
+                            ?>
+                        </footer>
+                    </article>
+                </div>
+            </div>
+            <?php endwhile; ?>
+            <div class="navigation">
+                <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
+            </div><!-- /.navigation -->
+            <?php else: ?>
+            <div id="post-404" class="noposts">
+                <p><?php _e('Sorry, no results were found.');?></p>
+            </div><!-- /#post-404 -->
+            <?php endif;?>
+        </div>
+            <?php } ?> <!-- end empty query check -->
\ No newline at end of file
index 4dcaacd..04a2f03 100644 (file)
     }
 }
 #blog-posts-over article {
-    padding-top: 10px;
-    margin-bottom: 15px;
+    padding-top: 0;
+    margin-bottom: 25px;
     display: inline-block;
     width: 100%;
+    font-size: 16px;
+    line-height: 1.5;
+    h1 {
+        line-height: 1;
+    }
     p {
         padding-bottom: 15px;
-        font-size: 18px;
+        font-size: 16px;
     }
     a.read-more {
         color: $white;
             margin: 0 0 12px;
         }
     }
+    hr.contentBreak {
+        margin: 5px 0;
+    }
+    .blog-feed-imgs img {
+        border-radius: 2px;
+    }
 }
 #blog-posts-over.ai1ec-post article {
     /*background-color: rgba(255, 140,140, 0.2);*/
     color: #757575;
     font-size: 12px;
 }
+.blog-archive #blog-posts-over > div,
 .blog-home #blog-posts-over > div {
     margin: 25px 0;
 }
index 5a488f1..584a036 100644 (file)
@@ -12,6 +12,7 @@
     a {
         color: lightgrey;
         text-decoration: underline;
+        font-size: rem-calc(14);
     }
 }
 #footer_address span.bullet,
index f1880da..6833362 100644 (file)
@@ -54,7 +54,7 @@ main {
         }
         .block {
             margin-bottom: 80px;
-            transition: all .2s ease in out;
+            transition: all .2s ease-in-out;
             img {
                 border: none;
                 padding: 0;
@@ -116,7 +116,7 @@ main {
         }
         #main-content {
             margin-top: 25px;
-            h1 {
+/*            h1 {
                 padding: 0;
                 width: 100%;
                 display: block;
@@ -128,12 +128,12 @@ main {
                 text-transform: uppercase;
                 color: #212121;
                 font-family: "ingram-wide-2";
-            }
-            p {
+            }*/
+/*            p {
                 color: $dark-grey;
                 font-family: "ingram-wide-2";
                 font-size: 18px;
-            }
+            }*/
         }
         #mid {
             background: url(../assets/central-swing-full-image.jpg);
index 3b96b24..bdba5c9 100644 (file)
@@ -175,7 +175,7 @@ body {
         text-decoration: underline;
     }
 }
-.members-only-template {
+main.members-only-template {
     #menu-side h2 a {
         color: white;
         font-size: 1.875rem;
@@ -211,6 +211,12 @@ body {
         color: $gold;
         border-bottom: 1px solid $gold;
     }
+    .blocks .block {
+        margin-bottom: 50px;
+    }
+    .blog-feed-post {
+        margin-bottom: 20px;
+    }
 }
 #glm-member-front-header {
     border-bottom: 1px solid lightgrey;
@@ -219,6 +225,9 @@ body {
 }
 #glm-member-front-header .glm-button.button {
     background-color: $red;
+    @media #{$medium-down} {
+        clear: right;
+    }
 }
 #glm-member-front-header .glm-member-greeting {
     float: left;
index 7a4f232..161e354 100644 (file)
     <div id="head-img">
         <div class="featured-image" style="background: url('<?php echo get_template_directory_uri();?>/assets/default.jpg') no-repeat scroll 0px bottom / cover;"></div>
     </div>
-    <?php //get_template_part('parts/reservation-form');?>
     <div class="row">
-        <?php if (get_search_query() == "") { ?>
-        <br><h2 class="search-result-header small-12 columns">Please enter a query in the search box. </h2>
-        <?php } else { ?>
-        <br><h2 class="search-result-header small-12 columns">Search Results for "<?php echo get_search_query(); ?>"</h2>
-        <div id="blog-posts-over" class="small-12 columns">
-            <?php if(have_posts()) : while(have_posts()): the_post();?>
-                <?php if (is_search() && (isset($_GET['searchType']) && $_GET['searchType'] == 'blog') && ($post->post_type=='page')) continue; ?>
-            <div class="row content search-result-container">
-                <div class="small-11 small-centered columns">
-                    <article id="<?php the_ID()?>" <?php post_class()?>>
-                        <header class="entry-header">
-                            <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
-                            <span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
-                        </header>
-
-
-                <!-- Start of the Contextual/Highlight Search -->
-                                <?php
-                                // Configuration
-                                $max_length = 400; // Max length in characters
-                                $min_padding = 30; // Min length in characters of the context to place around found search terms
-
-                                // Load content as plain text
-                                global $wp_query, $post;
-                                $content = (!post_password_required($post) ? strip_tags(preg_replace(array("/\r?\n/", '@<\s*(p|br\s*/?)\s*>@'), array(' ', "\n"), apply_filters('the_content', $post->post_content))) : '');
-
-                                // Search content for terms
-                                $terms = $wp_query->query_vars['search_terms'];
-                                if ( preg_match_all('/'.str_replace('/', '\/', join('|', $terms)).'/i', $content, $matches, PREG_OFFSET_CAPTURE) ) {
-                                    $padding = max($min_padding, $max_length / (2*count($matches[0])));
-
-                                  // Construct extract containing context for each term
-                                  $output = '';
-                                  $last_offset = 0;
-                                  foreach ( $matches[0] as $match ) {
-                                    list($string, $offset) = $match;
-                                    $start  = $offset-$padding;
-                                    $end = $offset+strlen($string)+$padding;
-                                    // Preserve whole words
-                                    while ( $start > 1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$start-1}) ) $start--;
-                                    while ( $end < strlen($content)-1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$end}) ) $end++;
-                                    $start = max($start, $last_offset);
-                                    $context = substr($content, $start, $end-$start);
-                                    if ( $start > $last_offset ) $context = '...'.$context;
-                                    $output .= $context;
-                                    $last_offset = $end;
-                                  }
-
-                                  if ( $last_offset != strlen($content)-1 ) $output .= '...';
-                                } else {
-                                  $output = $content;
-                                }
-
-                                if ( strlen($output) > $max_length ) {
-                                  $end = $max_length-3;
-                                  while ( $end > 1 && preg_match('/[A-Za-z0-9\'"-]/', $output{$end-1}) ) $end--;
-                                  $output = substr($output, 0, $end) . '...';
-                                }
-
-                                // Highlight matches
-                                $context = nl2br(preg_replace('/'.str_replace('/', '\/', join('|', $terms)).'/i', '<strong>$0</strong>', $output));
-                                ?>
-
-                                <p class="search_result_context">
-                                  <?php echo $context ?>
-                                </p>
-                                <p>
-                                  <a href="<?php the_permalink() ?>" rel="bookmark">Read this entry</a>
-                                </p>
-                <!-- End of the Contextual/Highlight Search -->
-
-                        <?php //echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
-                        <footer class="entry-meta small-12 medium-6 medium-push-3 center">
-                            <?php
-                            if (has_category()) {
-                                $post_categories = wp_get_post_categories( get_the_ID() );
-                                $cats = array();
-                                echo 'This entry was posted ';
-                                echo 'in';
-                                foreach($post_categories as $c){
-                                    $cat = get_category( $c );
-                                    $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
-                                    echo ', <a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>';
-                                }
-                                echo '.';
-                            }
-                            ?>
-                        </footer>
-                    </article>
+        <?php if (isset($_GET['searchType']) && $_GET['searchType'] == 'member_post') { ?>
+            <?php if (current_user_can("glm_members_member")) { ?>  <!-- If user is logged in as a member, display top bar, bread crumbs, & content -->
+                <div id="blog-posts-over" class="small-12 medium-8 columns">
+                    <?php get_template_part('parts/glm-members-only-top-bar'); ?>
+                    <?php get_template_part('parts/search-content'); ?>
                 </div>
+                <?php get_template_part('parts/blog-sidebar-members-only'); ?>
+            <?php } else { ?> <!-- Otherwise, display main members only page content & form -->
+                <?php get_template_part('parts/glm-members-only-login-form'); ?>
+            <?php } ?>
+        <?php } else { ?> <!-- If the post is not of type member post, just treat it like a normal post -->
+            <div id="blog-posts-over" class="small-12 medium-8 columns">
+                <?php get_template_part('parts/search-content'); ?>
             </div>
-            <?php endwhile; ?>
-            <div class="navigation">
-                <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
-            </div><!-- /.navigation -->
-            <?php else: ?>
-            <div id="post-404" class="noposts">
-                <p><?php _e('Sorry, no results were found.');?></p>
-            </div><!-- /#post-404 -->
-            <?php endif;?>
-        </div>
-            <?php } ?> <!-- end empty query check -->
+            <?php get_template_part('parts/blog-sidebar-r'); ?>
+        <?php } ?>
+
     </div>
     <?php get_footer(); ?>
index d25a41e..f32e935 100644 (file)
@@ -3,84 +3,24 @@
         <div id="head-img">
             <div class="featured-image" style="background: url('<?php echo get_template_directory_uri();?>/assets/default-header.jpg') no-repeat scroll 0px bottom / cover;"></div>
         </div>
-    <?php //get_template_part('parts/reservation-form');?>
         <div class="row">
-
-            <?php
-            if (is_single() && is_post_type('ai1ec_event')){
-                echo '<div id="blog-posts-over" class="small-12 medium-11 medium-centered columns ai1ec-post">';
-            } else {
-                echo '<div id="blog-posts-over" class="small-12 medium-8 columns">';
-
-            }
-            ?>
-            <div id="addthis_wrapper">
-                <!-- AddThis Button BEGIN -->
-                <div class="addthis_toolbox addthis_default_style">
-                <a class="addthis_counter addthis_pill_style"></a>
-            </div>
-            <script type="text/javascript">var addthis_config = {"data_track_addressbar":false};</script>
-            <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5135fe4558d287a9"></script>
-        <!--    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>-->
-                <!-- AddThis Button END -->
-            </div><!--/#addthis_wrapper-->
-                <?php if(have_posts()) : while(have_posts()): the_post();?>
-                <div class="row blog-post-container">
-                    <div class="small-11 small-centered columns">
-                        <div class="row">
-                            <div class="small-12 columns">
-                                <article id="<?php the_ID()?>" <?php post_class()?>>
-                                    <header class="entry-header">
-                                        <h1 class="entry-title"><?php the_title();?></h1>
-                                        <span class="meta date"><?php the_time('F jS, Y') ?></span>
-                                    </header>
-                                    <?php echo the_content(); ?>
-                                    <?php //comments_template(); ?>
-<!--                                    <footer class="entry-meta small-12 medium-6 medium-push-3 center">-->
-                                        <?php $post_categories = wp_get_post_categories( get_the_ID() );
-                                        $cats = array();
-//                                        echo 'This entry was posted ';
-                                        if (has_category()) {
-//                                            echo 'in ';
-                                            foreach($post_categories as $c){
-                                                $cat = get_category( $c );
-                                                $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
-                                                echo '<a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>, ';
-                                            }
-                                        }
-//                                        $post_tags = wp_get_post_tags( get_the_ID() );
-//                                        $tags = array();
-//                                        if (has_tag( )) {
-//                                            echo ' and tagged ';
-//                                            foreach($post_tags as $t){
-//                                                $tag = get_tag( $t );
-//                                                $tags[] = array( 'name' => $tag->name, 'slug' => $tag->slug );
-//                                                echo '<a rel="category" title="View all posts in '. $tag->name . ' " href="'. $tag->slug .'">'. $tag->name .'</a>, ';
-//                                            }
-//                                        }
-//                                        echo ' on ';
-//                                        echo ' <span class="meta date"> ' . the_time('F jS, Y') . '</span>';
-//                                        ?>
-<!--                                    </footer>-->
-                                </article>
-                            </div>
-                        </div>
+            <?php if (is_single() && is_post_type('member_post')){ ?> <!-- If the post is of type Member Post
+                <?php if (current_user_can("glm_members_member")) { ?>  <!-- If user is logged in as a member, display top bar, bread crumbs, & content -->
+                    <div id="blog-posts-over" class="small-12 medium-8 columns">
+                        <?php get_template_part('parts/glm-members-only-top-bar'); ?>
+                        <?php get_template_part('parts/blog-addthis-wrapper'); ?>
+                        <?php get_template_part('parts/blog-single-content'); ?>
                     </div>
-
-
+                    <?php get_template_part('parts/blog-sidebar-members-only'); ?>
+                <?php } else { ?> <!-- Otherwise, display main members only page content & form -->
+                    <?php get_template_part('parts/glm-members-only-login-form'); ?>
+                <?php } ?>
+            <?php } else { ?> <!-- If the post is not of type member post, just treat it like a normal post -->
+                <div id="blog-posts-over" class="small-12 medium-8 columns">
+                    <?php get_template_part('parts/blog-addthis-wrapper'); ?>
+                    <?php get_template_part('parts/blog-single-content'); ?>
                 </div>
-                <?php endwhile; ?>
-                <?php else: ?>
-                <div id="post-404" class="noposts">
-                    <p><?php _e('Sorry, no results were found.');?></p>
-                </div><!-- /#post-404 -->
-                <?php endif;?>
-            </div>
-            <?php
-            if (is_single() && !is_post_type('ai1ec_event')){
-                get_template_part('parts/blog-sidebar-r');
-            }
-            ?>
-        <?php //get_template_part('parts/interior-footer'); ?>
+                <?php get_template_part('parts/blog-sidebar-r'); ?>
+            <?php } ?>
         </div>
         <?php get_footer(); ?>