Automattic / Automattic/allow-numeric-stubs
Child post redirects to parent
- Dominant language
- PHP
- Stars
- 16
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
I modified the plugin code to work with CPTs. You can view my forked repository here: https://github.com/akshatkedia/allow-numeric-stubs
WordPress is now allowing numeric slugs for CPTs but when I visit a child post with a numeric slug it redirects to the parent post automatically. So for example I have a Programmes CPT. There is a parent program with the slug: programmes/city-in-visible/ and a child program with the slug: programmes/city-in-visible/2009/
Visiting programmes/city-in-visible/2009/ redirects to programmes/city-in-visible/
Can you please suggest a solution for this?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the redirect with the Programmes CPT example, using the parent slug programmes/city-in-visible/ and child slug programmes/city-in-visible/2009/. Then inspect the plugin code in the linked fork to identify where numeric stubs and child-post URL resolution are handled. Done means visiting the child URL no longer redirects to its parent while the existing numeric-slug behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100