I’ve found the code I need to change to do this:
class Walker_Page extends Walker {
var $tree_type = 'page';
var $db_fields = array ('parent' => 'post_parent', 'id' => 'ID'); //TODO: decouple this
function start_lvl(&$output, $depth) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent<ul>\n";
}
function end_lvl(&$output, $depth) {
$indent = str_repeat("\t", $depth);
$output .= "$indent</ul>\n";
}
function start_el(&$output, $page, $depth, $current_page, $args) {
if ( $depth )
$indent = str_repeat("\t", $depth);
else
$indent = '';
extract($args, EXTR_SKIP);
$css_class = 'page_item page-item-'.$page->ID;
if ( !empty($current_page) ) {
$_current_page = get_page( $current_page );
if ( in_array($page->ID, (array) $_current_page->ancestors) )
$css_class .= ' current_page_ancestor';
if ( $page->ID == $current_page )
$css_class .= ' current_page_item';
elseif ( $_current_page && $page->ID == $_current_page->post_parent )
$css_class .= ' current_page_parent';
}
$output .= $indent . '<li class="' . $css_class . '"><a href="' . get_ _link($page->ID) . '" title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '">' . apply_filters('the_title', $page->post_title) . '</a>';
if ( !empty($show_date) ) {
if ( 'modified' == $show_date )
$time = $page->post_modified;
else
$time = $page->post_date;
$output .= " " . mysql2date($date_format, $time);
}
}
function end_el(&$output, $page, $depth) {
$output .= "</li>\n";
}
}
however, I’d much rather do some changes in the functions.php of my theme than change this part. So, what do I have to do to make a custom function.php that can change this part of the code?