admin管理员组文章数量:1327524
In WP 5.4.x, I was able to add a number to the URL for any page, post, etc. (incl. custom post types), which WP interpreted as the 'page' for a multi-page post, even if that page or post didn't actually have multiple pages. I assume that this was some kind of shortcut for /page/12345/
I could, for instance, open /some-page/12345/, even if that page didn't use a "nextpage" tag. The behaviour also worked for custom post types, e.g. WooCommerce products.
I used this behaviour in a custom plug-in where I needed a numeric ID passed (without having to use custom rewrites). In WP 5.5, WP does a 301 redirect via redirect_canonical instead when a post/page doesn't actually have multiple pages. Is there a way to restore that old behaviour in 5.5?
本文标签:
版权声明:本文标题:plugin development - How to restore WP 5.4 behaviour where a numeric string could added to each page URL and parsed as " 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742193534a2430655.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论