I am working on a website for a company right now and I am running into this issue:
The original URL is similar to this: mysite.com/industrial/
where industrial
has 4 subcategories which each have 2-6 pages within them. I changed the original URL to mysite.com/products/
but the subcategories and pages within are not changing to include products
in their URL – they still use industrial
.
For ex.: mysite.com/industrial/abc/
should be mysite.com/products/abc/
but it stays as mysite.com/industrial/abc/
after I made my change.
I assume that the subcategories are in a folder called industrial (I did not create this website so I do not know), however I can’t find that folder anywhere and I’m not sure where to look. I have tried to go in to each of the subcategories and change their URLs, but I can only edit the abc
part of the URL and I can’t touch the rest.
** This was all done on WordPress with a custom theme created by another company. Thank you in advance for any help you can offer!
EDIT: For anyone who is also struggling this problem this is how I solved it:
- Go to Plugins -> Plugin Editor
- At the top there was an option called "Select plugin to edit" -> chose the one that is custom to your website
- I found the information that was suggested by Phil in the comment section on this website
- I updated the names of my fields in the rewrite permastruct section for
register_post_type
as well asregister_taxonomy
- Update the page and flush your permalinks and you should be good to go!
2
Answers
Whenever a new Custom Post is added through a plugin or them, then the permalinks needs to be flushed.
In the WordPress admin area, go to “Settings > Permalinks”. Click “Save Changes”. The permalinks and rewrite rules are now flushed.
Check what is the defined slug when registering the custom post type.