Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $page_parent = 10;?>
- <?php //query_posts(array('showposts' => 1, 'orderby' => 'rand', 'post_parent' => $page_parent, 'post_type' => 'page')); while (have_posts()) { the_post(); ?>
- <?php
- $args = array(
- 'posts_per_page' => 1,
- 'orderby' => 'rand',
- 'post_parent' => $page_parent,
- 'post_type' => 'page',
- );
- $pages = new WP_Query($args);
- ?>
- <?php if($pages->have_posts()){ $pages->the_post(); ?>
- <div class="the-title"><?php the_title(); ?></div>
- <?php }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement