Make it work with a CPT
-
I made changes to the “Allow Numeric Slugs” plugin to remove the -2 from our CPT slug, but now if the CPT is a child it gets redirected to the parent post.
Here are all live links and code:
This is a parent page/post within the CPT (which works fine)
https://chrsdev.com/testurls/we-buy-houses/california/This is a child page/post of the above parent page, but it brings up the content of the parent page. (which is NOT correct)
https://chrsdev.com/testurls/we-buy-houses/california/818/If I don’t assign a parent page to “818”, and just have it be a top level page, then it works fine, but when I assign it as a child of the parent page “california” the content of the parent page gets displayed.
Here’s the code for registering the CPT
https://codepad.org/Wm5UwkNDHere’s the code for the plugin (originally only for post type “page”, I changed it to work with our CPT ‘area’)
https://codepad.org/Z0hZyFKlThe page I need help with: [log in to see the link]
- The topic ‘Make it work with a CPT’ is closed to new replies.