Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $homepages = get_pages( array(
- 'post_type' => 'page',
- 'post_status' => 'publish',
- 'meta_key' => '_wp_page_template',
- 'meta_value' => 'homepage.php'
- ));
- shuffle($homepages);
- foreach( $homepages as $page ) {
- $content = $page->post_content;
- if ( ! $content ) // Check for empty page
- continue;
- $content = apply_filters( 'the_content', $content );
- echo $content;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement