Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save the permalinks structure after changing custom post types #63

Closed
igorschoester opened this issue Feb 25, 2020 · 1 comment · Fixed by #64
Closed

Save the permalinks structure after changing custom post types #63

igorschoester opened this issue Feb 25, 2020 · 1 comment · Fixed by #64
Labels
bug Something isn't working

Comments

@igorschoester
Copy link
Member

Describe the feature you'd like

When the setting Enable post types & taxonomies. is changed, also update the permalink structure in WordPress, preventing 404s in the docker environment.

Reproduce

  1. Disable Enable post types & taxonomies..
  2. Save the WP permalink settings.
  3. Enable Enable post types & taxonomies..
  4. Go to a frontend page of a book for example and see a 404 page. Tip, use the sitemap: http:https://basic.wordpress.test/book-sitemap.xml

The workaround is manually saving the permalink settings again.

@igorschoester igorschoester added the bug Something isn't working label Feb 25, 2020
@moorscode
Copy link
Contributor

moorscode commented Feb 25, 2020

Context / function call needed to make this happen: https://developer.wordpress.org/reference/functions/flush_rewrite_rules/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants