I tried the code out and it is changing the url but not working correctly… It is changing every new page into “domain.com/1.html”. Everyone ends in “1.html”.
In wp-includes/template-functions-post.php, at line 419 I replaced
$output .= $indent . ‘[li class=”‘ . $css_class . ‘”][a href=”‘ . get_page_link($page_id) . ‘” title=”‘ . wp_specialchars($title) . ‘”]’ . $title . ‘[/a]’;
with your code…
$output .= $indent . ‘[li class=”‘ . $css_class . ‘”][a href=”‘ . rtrim(get_page_link($page_id)>, ‘/’) . ‘.html” title=”‘ . wp_specialchars($title) . ‘”]’ . $title . ‘[/a]’;
I initially received an error about an unexpected comma “,” on this 419 line so I deleted the comma after “($page_id)>” and the error went away.
In wp-includes/classes.php, at line 1510 I replaced
$req_uri = preg_replace(“|^$home_path|”, ”, $req_uri);
$req_uri = trim($req_uri, ‘/’);
with your code…
$req_uri = preg_replace(“|^$home_path|”, ”, $req_uri);
$req_uri = preg_replace(“|.html$|”, ”, $req_uri);
Did I implement it correctly by replacing those lines in these two files?
If this can be altered to work that would be great!