logo
We have finished migration to the new data center successfully and are working out some minor issues within the site's code. If you experience any difficulties or have any questions please email us at [email protected].
Ask your WordPress questions! Pay money and get answers fast! (more info)

Andrea P

Website



Written in response to 404 when page sits inside custom post type slug:

interesting solution Reigel!

though I haven't tested it but at a first look I am wondering if this won't cause similar problems happening with the archives pages instead (or with something else which is relying on similar rewrite rules)..
I mean that if you keep the same slug, and actually the same rewrite rules as it was before, it is very likely that they will crash one against the other, somewhere, even if you invert their priority..

this method seems to rebuild the rewrite rules array, passing the rewrite rules related to the pages as first element of the array. in this way, those rules will have priority on the others, and hence the sub-pages issue is fixed because it now first assumes that the slug is meant to be the page slug, rather than the post_type slug.
but what about the archives and other stuff which rely on the other rules that now have less priority? wouldn't they be messed up as it happened before with the pages rules?

in any case, I feel that changing the slug is quick and easy, and more secure. and you can also keep the title as you want, and just change the slug for the url, which could be a good excuse to adding another keyword to it. ;)


Updated: 03/10/16 10:36am


Upvote / Downvote

3 groups of people are allowed to vote for discourse:

All votes are public.

You are not allowed to vote: