Make WordPress Core

Opened 5 years ago

Last modified 14 months ago

#15811 new enhancement

Self-referrent links should be made avoidable in wp_list_pages / wp_page_menu

Reported by: lewebmobile Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: General Keywords: needs-refresh
Focuses: Cc:


Having a page that links to itself is a well-recognized usability and accessibility problem.

Currently, wp_list_pages and wp_page_menu don't offer an option to avoid self-referrent links.

The patch attached to this report adds a "self_link" parameter to these two functions (defaulting to the current behaviour); when that parameter is set to false, the markup produced by these functions don't include a link to the current page.

Someone proposed a plugin to that effect:
but it sounds like something that the core Wordpress should support.

Attachments (1)

patch (1.8 KB) - added by lewebmobile 5 years ago.
Patch to add a parameter to avoid self-referrent links in wp_list_pages / wp_page_menu

Download all attachments as: .zip

Change History (7)

5 years ago

Patch to add a parameter to avoid self-referrent links in wp_list_pages / wp_page_menu

#1 @lewebmobile
5 years ago

  • Keywords has-patch added

#2 @Denis-de-Bernardy
5 years ago

The issue here breaks down to the joys of caching and cache invalidation.

#3 @jane
5 years ago

  • Component changed from General to Gallery

Usability-wise, yes, it drives me nuts when you're on a Page and the nav item for it is still linked, as it's counter to how most web sites work.

#4 @jane
5 years ago

  • Component changed from Gallery to General

#5 @nacin
5 years ago

  • Milestone changed from Awaiting Review to Future Release

#6 @chriscct7
14 months ago

  • Keywords needs-refresh added; has-patch removed
Note: See TracTickets for help on using tickets.