Giter Club home page Giter Club logo

allow-numeric-stubs's People

Contributors

viper007bond avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

allow-numeric-stubs's Issues

Child post redirects to parent

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?

Site sends 301 response code on redirect

An all-numeric URL may come from part numbers, serial numbers, etc, and probably rely on search engines to index the unmodified numerical slug.

A status response of 301 creates a situation where search engines may update their index to the redirected URL /######-2/ whereas a 302 redirect will not initiate this update. And more specifically 302 has been superceded by 303 and 307 responses, with 307 likely the appropriate one.

https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection

I see that you're hooking into wp_unique_post_slug and am not sure you can control the redirect status from where you're doing this modification, so changing to 307 might not be an option. Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.