Enable blog feed members only page
authorLaury GvR <laury@gaslightmedia.com>
Mon, 17 Jul 2017 18:39:56 +0000 (14:39 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Mon, 17 Jul 2017 18:39:56 +0000 (14:39 -0400)
parts/glm-members-only-blog-feed.php

index 1fd7c19..7aef777 100644 (file)
@@ -1,16 +1,8 @@
 <?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' );
+$args = array( 'posts_per_page' => '5', 'post_status' => 'publish', 'post_type' => 'member_post' );
 $lastposts = get_posts( $args );
 if ($lastposts) { ?>
 
@@ -36,5 +28,7 @@ if ($lastposts) { ?>
                 </div>
             <?php endforeach; ?>
             </div>
+                <a href="<?php echo get_home_url(null, "/?post_type=member_post"); ?>" style='text-decoration: underline'>Click here to see more True North News</a>
         </div>
+
 <?php } ?>