Make WordPress Core

Ticket #17590: 17590.4.diff

File 17590.4.diff, 631 bytes (added by obenland, 11 years ago)
  • wp-includes/post-template.php

     
    850850                        $output .= '<li class="pagenav">' . $r['title_li'] . '<ul>';
    851851
    852852                global $wp_query;
    853                 if ( is_page() || is_attachment() || $wp_query->is_posts_page )
     853                if ( ( is_singular() && is_post_type_hierarchical( get_post_type() ) ) || is_attachment() || $wp_query->is_posts_page )
    854854                        $current_page = $wp_query->get_queried_object_id();
    855855                $output .= walk_page_tree($pages, $r['depth'], $current_page, $r);
    856856