Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $post;
- $args = array(
- 'parent' => $post->ID,
- 'post_type' => 'page',
- 'post_status' => 'publish'
- );
- $children = get_pages( $args );
- if ( ! empty( $children ) ) :
- ?>
- <div class="childcells">
- <?php
- foreach ( $children as $post ) : setup_postdata( $post );
- ?>
- <div class="childcell">
- <?php if ( has_post_thumbnail() ) : ?>
- <div class="thumbnail"><?php the_post_thumbnail( 'small-thumb' ); ?></div>
- <?php endif; ?>
- <div class="myclasstitle"><?php the_title(); ?></div>
- <span class="desc"><?php echo get_post_meta( get_the_ID(), 'desc', true ); ?></span>
- <div class="excerpt"><?php the_excerpt(); ?></div>
- <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">Read more</a>
- </div>
- <?php
- endforeach;
- wp_reset_postdata();
- ?>
- </div>
- <?php endif; ?>
Add Comment
Please, Sign In to add comment