WP makes a list of links, and helpfully applies a current_page class, but I’m concerned with the accessibility issues of a link to the page you’re on.
Normally I’d swap the <a href
etc with a <span
, How would you approach that with WordPress?
(apart from manually creating the list of pages!)
Rewriting the entire walker class is a big pain… much more work than is justified for the result. But you can use a bit of javascript to remove the link. If you’re including jquery, something like this should work:
Just recently I published a plugin, that does exactly this: Remove Redundant Links. You may costumize the output per filter, examples are in the readme.