Advertisement
elmanisero

code standard

Apr 8th, 2011
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.11 KB | None | 0 0
  1. <?php
  2. $postIDs = array();
  3. $pageChildren = get_pages('child_of=' . $post->ID . '&exclude=' . $exclude_page );
  4. if ( $pageChildren ) {
  5.   foreach ( $pageChildren as $pageChild ) {
  6.     $postIDs[] = $pageChild->ID;
  7.   }
  8.   $paged = (intval(get_query_var('paged'))) ? intval(get_query_var('paged')) : 1;
  9.   $args = array(
  10.     'post_type' => 'page',
  11.     'paged' => $paged,
  12.     'post__in' => $postIDs,
  13.     'posts_per_page' => 10
  14.                 );
  15.   query_posts($args);
  16.  
  17.   if (have_posts()) : while (have_posts()) : the_post(); ?>
  18.  
  19.     <div class="post" id="post-<?php the_ID(); ?>">
  20.     <h2><?php the_title(); ?></h2>
  21.     <div class="entry">
  22.       <?php the_excerpt('<p class="serif">Read the rest of this page ยป</p>'); ?>
  23.  
  24.       <?php wp_link_pages(array('before' => '<p>Pages: ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
  25.  
  26.     </div>
  27.  
  28.   </div>
  29.   <?php endwhile; ?>
  30.   <div class="navigation">
  31.     <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
  32.     <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
  33.   </div>
  34.  
  35. <?php endif; ?>
  36.  
  37. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement