Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $postid = $post->ID;
- $args = array(
- 'post_type' => 'page',
- 'post_status' => 'publish',
- 'orderby' => 'date',
- 'order'=> 'DESC',
- 'posts_per_page' => -1,
- 'post_parent' => $postid,
- );
- $child_level = get_posts($args);
- if($child_level) :
- foreach($child_level as $child_page) :
- $args = array(
- 'post_type' => 'page',
- 'post_status' => 'publish',
- 'orderby' => 'date',
- 'order'=> 'DESC',
- 'posts_per_page' => -1,
- 'post_parent' => $child_page->ID
- );
- $my_query = null;
- $my_query = new WP_Query($args);
- if( $my_query->have_posts() ) {
- while ($my_query->have_posts()) : $my_query->the_post(); ?>
- <div class="product-box">
- <div class="product-content">
- <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
- <div class="productimg"><?php the_post_thumbnail('thumbnail'); ?></div>
- <p><?php echo excerpt(15); ?></p>
- <p class="p-more"><a href="#product-<?php the_id(); ?>">More</a></p>
- <div class="product-details">
- <div class="pd-col">
- <p class="price">P<?php echo $cfs->get('prod_price', $pageChild->ID); ?></p>
- <!--<p class="rating"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/rate0.png"></p>-->
- <p class="rating"><?php if(function_exists('the_ratings')) { the_ratings(); } ?></p>
- </div>
- <div class="pd-col">
- <a href="<?php the_permalink(); ?>"><div class="buyicon"></div></a>
- </div>
- </div><!-- product-details -->
- </div>
- </div><!-- product-box -->
- <?php endwhile;
- }
- wp_reset_query();
- endforeach;
- endif;
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment