Ticket #17590: 17590.3.patch
File 17590.3.patch, 884 bytes (added by , 12 years ago) |
---|
-
post-template.php
838 838 * @return string HTML content, if not displaying. 839 839 */ 840 840 function wp_list_pages($args = '') { 841 global $wp_query; 842 841 843 $defaults = array( 842 844 'depth' => 0, 'show_date' => '', 843 845 'date_format' => get_option('date_format'), … … 868 870 if ( $r['title_li'] ) 869 871 $output .= '<li class="pagenav">' . $r['title_li'] . '<ul>'; 870 872 871 global $wp_query; 872 if ( is_page() || is_attachment() || $wp_query->is_posts_page ) 873 if ( is_singular() && is_post_type_hierarchical( $wp_query->get( 'post_type' ) ) || is_attachment() || $wp_query->is_posts_page ) 873 874 $current_page = $wp_query->get_queried_object_id(); 874 875 $output .= walk_page_tree($pages, $r['depth'], $current_page, $r); 875 876