Normally it is not possible to have a page slug (the page’s name in the URL) that is a number. For example this will not work:
yoursite.com/about/2/. That URL conflicts with paged content feature where you can posts and pages with multiple pages of content by adding
<!--nextpage--> within your content.
This plugin allows you to have pages with numbers as slugs by giving up the ability to have paged content pages which isn’t a big deal as most people don’t use paged content pages anyway.
Code contributions and bug reports are welcome via this plugin’s GitHub repository.
- Go to your admin area and select Plugins → Add New from the menu.
- Search for “Allow Numeric Slugs”.
- Click install.
- Click activate.
Người đóng góp & Lập trình viên
“Allow Numeric Slugs” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.Những người đóng góp
Dịch “Allow Numeric Slugs” sang ngôn ngữ của bạn.
Muốn tham gia phát triển?
Duyệt code, check out SVN repository, hoặc theo dõi nhật ký phát triển qua RSS.
Nhật ký thay đổi
- Ditch all of the old fragile hackery of this plugin in favor of just hooking into the WordPress function that ensures that slugs are unique. It’s what was adding the
-2suffix in the first place.
- Update for WordPress 4.4’s rewrite rules.
- PHP 7 compatibility by renaming class constructor. Also drops unneeded references.
- Update for WordPress 3.3’s rewrite rules.
- Re-add the
save_postfilter after fixing the slug incase multiple posts are updated in one pageload.
- Recoded for WordPress 3.0+. WordPress now won’t let you manually enter a numeric slug — it will prefix “-2” onto the end of it so that the page is viewable. This new plugin version works around it.
- Initial release.