I'm wondering if there is some PHP I to add to a page loop i'm creating. I'm querying pages of a certain parent which are protected. Some of which are time-released. I'd like to loop through pages with title, featured image, etc. I'd only like to show those that a Member has access to at any given time. Would there be some code to use for aM protection within a page loop? PHP: <?php $parent = $post->ID; ?> <?php query_posts('posts_per_page=50&order=ASC&&post_type=page&post_parent='.$parent); if (have_posts()) : while (have_posts()) : the_post(); ?>[am if product 1 + has access now ]<h2 class="page-title"> <?php the_title(); ?></h2><?php the_post_thumbnail('thumb', array('class' => 'post-thumb')); ?>[/ am if product 1]<?php endwhile; endif; ?>
This should work automatically if you will select "hide" action for these pages when you set protection. http://www.amember.com/docs/Redirect_Settings Pages will not be available in results then.