WordPress.org

Make WordPress Core

Ticket #45513: 45513.patch

File 45513.patch, 849 bytes (added by mukesh27, 2 years ago)

Please try this patch it working fine for me.

  • wp-includes/rewrite.php

    diff -Naur wp-includes/rewrite.php wp-includes/rewrite.php
     
    371371         * for month-slug clashes when `is_month` *or* `is_day`.
    372372         */
    373373        $compare = '';
    374         if ( 0 === $postname_index && ( isset( $query_vars['year'] ) || isset( $query_vars['monthnum'] ) ) ) {
     374        if ( 0 === $postname_index && isset( $query_vars['year'] ) ) {
    375375                $compare = 'year';
     376        } elseif ( 0 === $postname_index && isset( $query_vars['monthnum'] ) ) {
     377                $compare = 'monthnum';
    376378        } elseif ( '%year%' === $permastructs[ $postname_index - 1 ] && ( isset( $query_vars['monthnum'] ) || isset( $query_vars['day'] ) ) ) {
    377379                $compare = 'monthnum';
    378380        } elseif ( '%monthnum%' === $permastructs[ $postname_index - 1 ] && isset( $query_vars['day'] ) ) {