WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!)

share|improve this question
I'm not sure that's possible - usually I use the current page class to change the mouse hover and style to make it look unlinked. I wasn't aware there were accessibility issues with this - can you explain in more detail? Thanks! – Michelle Jan 19 '11 at 18:05
@McGirl Screen reader users are irritated by links to the current page. You cannot fix that with CSS. – toscho Jan 19 '11 at 19:28
Good to know! I hadn't considered how screen reader users would feel about links to the current page. I know it can't be fixed via CSS :) Thanks for the question - I'm going to look into implementing the solution on my sites too. – Michelle Jan 19 '11 at 20:41

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:

jquery(document).ready(function() {
    jquery('.current_page_item a').removeAttr( 'href' );
share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.