[wp-hackers] numeric slugs redux

Otto otto at ottodestruct.com
Thu Mar 31 17:24:53 UTC 2011

On Thu, Mar 31, 2011 at 7:34 AM, Steve Taylor <steve at sltaylor.co.uk> wrote:

> At some point the numeric slug at the end is being split off from the
> request URI and placed in the 'page' request var.

Yes. A number at the end of a URL is considered to be a page number, not a
separate page. Basically, WordPress does not support all numeric slugs well.

- Does anyone know if the above hack might cause others problems along the
> line?

Probably will, yes. It's something that you'll have to keep up to date,
basically. You might be better off using a known and supported plugin:

- What's the difference between 'page' and 'pagename' in the query
> vars? Might I be better off understanding the rewrites and adjusting
> the rules?

Page is the page number. Like Page 1, page 2, etc. If you use
<!--nextpage--> in the post to split it up into pages, then the URLs will be
like example.com/slug/1 and example.com/slug/2 and so on. Your year as the
slug is being interpreted as page 2011 of the brazil page.

- Are there any plans to properly address the issues with numeric
> slugs in WP? I don't want to be spending time with every WP release
> hacking this site to work properly. In the long run, am I looking at
> having to recode the whole site to work without numeric slugs?

There has been discussion about changing this sort of thing. See:


More information about the wp-hackers mailing list