[wp-trac] [WordPress Trac] #31069: Add month (short)name as a permalink structure tag

WordPress Trac noreply at wordpress.org
Tue Jan 20 23:13:43 UTC 2015


#31069: Add month (short)name as a permalink structure tag
-------------------------+------------------------------
 Reporter:  iseulde      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Permalinks   |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by tyxla):

 Welcome @iseulde.

 It is a nice idea, however I'm not sure if it should go into the core.
 Basically, if it is implemented, there are two cases:

 1. URLs like `2015/01` would continue working, which would cause content
 duplication (the same set of posts on two different URLs), which is
 usually not recommended for many reasons.
 1. URLS like `2015/01` would stop working to prevent duplication, which
 would break a lot of plugins, themes and custom code which currently
 relies on that query var structure.

 Neither 1, nor 2 would be good IMHO, so I believe this should not be
 implemented in the core.

 Also, it is not clear how this would work with multilingual plugins that
 use separate URLs for different languages. There would be issues if the
 month name is the same on 2 or more languages (if using the month name
 query var for specifying the language). And if the plugin prepends (or
 appends) the language as a query var or GET parameter, there would be
 cases where "januari" would not make sense for the current language. These
 would definitely need ugly workarounds.

 In addition to the above, the functionality that you describe can be
 implemented with a little custom code in your plugin/theme. Basically,
 this would require you to add 12 rewrite rules (one for each of the
 months), and eventually to remove the rewrite rules that are created for
 months by default (to remove duplicate content). This can be done by
 hooking late on the `date_rewrite_rules` filter, or on the
 `rewrite_rules_array` filter.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31069#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list