Простий спосіб:
1 | if (is_page( '10' )||is_page( '270' )||is_page( '164' )||is_page( '111' )) { |
2 | wp_list_pages( 'child_of=' . $post ->ID. '&title_li=' ); |
Альтернативний спосібз розширеною кастомізацією:
2 | $args = array ( 'post_parent' => $post_parent , 'post_type' => 'page' , 'orderby' => 'menu_order' , 'order' => 'ASC' ); |
3 | $subpages = new WP_query( $args ); |
4 | if ( $subpages ->have_posts()) : |
5 | while ( $subpages ->have_posts()) : $subpages ->the_post(); $i ++;?> |
7 | <h3><a href= "<?echo get_permalink();?>" ><? echo get_the_title();?></a></h3> |
8 | <div class = "panel loading" > |
9 | <p><? echo get_the_excerpt();?></p> |
14 | $output = '<p>No subpages found.</p>' ; |
RSS