Advertisement
Guest User

Untitled

a guest
Oct 8th, 2012
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <?php $homepages = get_pages( array(
  2. 'post_type' => 'page',
  3. 'post_status' => 'publish',
  4. 'meta_key' => '_wp_page_template',
  5. 'meta_value' => 'homepage.php'
  6. ));
  7. shuffle($homepages);
  8. foreach( $homepages as $page ) {
  9. $content = $page->post_content;
  10. if ( ! $content ) // Check for empty page
  11. continue;
  12. $content = apply_filters( 'the_content', $content );
  13. echo $content;
  14. }
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement