Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#26974 closed defect (bug) (duplicate)

WP confuses post permalink and day permalink when using /%year%/%monthnum%/%postname%/

Reported by: denis-de-bernardy's profile Denis-de-Bernardy Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5
Component: Permalinks Keywords:
Focuses: Cc:


To reproduce, create a new blog, select that permalink structure, and publish an untitled post. View it. Expected: the post shows up. Actual: the day shows up empty — unless, of course, the post's day matches the post's id.

Minor, but annoying. Temporary fix to disable day links entirely:

add_filter('date_rewrite_rules', function($date_rewrite_rules) {
	if (get_option('permalink_structure') == '/%year%/%monthnum%/%postname%/') {
		$date_rewrite_rules = array_filter($date_rewrite_rules, function($rule) {
			return strpos($rule, '&day=') === false;
	return $date_rewrite_rules;

Methinks disabling day links should be the default behavior in WP when that structure is chosen.

Change History (2)

#1 @SergeyBiryukov
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from trunk to 1.5

Duplicate of #5305 and #22592.

This ticket was mentioned in IRC in #wordpress-dev by ddebernardy. View the logs.

10 years ago

Note: See TracTickets for help on using tickets.