Ticket #17590: 17590.2.patch
File 17590.2.patch, 913 bytes (added by , 12 years ago) |
---|
-
wp-includes/post-template.php
801 801 * @return string HTML content, if not displaying. 802 802 */ 803 803 function wp_list_pages($args = '') { 804 global $wp_query; 805 804 806 $defaults = array( 805 807 'depth' => 0, 'show_date' => '', 806 808 'date_format' => get_option('date_format'), … … 831 833 if ( $r['title_li'] ) 832 834 $output .= '<li class="pagenav">' . $r['title_li'] . '<ul>'; 833 835 834 global $wp_query; 835 if ( is_page() || is_attachment() || $wp_query->is_posts_page ) 836 if ( is_singular() && is_post_type_hierarchical( $wp_query->get( 'post_type' ) ) || is_attachment() || $wp_query->is_posts_page ) 836 837 $current_page = $wp_query->get_queried_object_id(); 837 838 $output .= walk_page_tree($pages, $r['depth'], $current_page, $r); 838 839