WordPress: Loop pages

Discussion in 'Templates customization' started by isabel, Jan 2, 2012.

  1. isabel

    isabel New Member

    Joined:
    Dec 20, 2011
    Messages:
    5
    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; ?>
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279

Share This Page