fix: custom post type tags excluded from archive pages #124
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes an issue where posts from custom post types were excluded from archive pages, such as by date, category, or tag, as well as the home page which lists recent posts. It requires a little bit of manual intervention from developers when they generate post types, but it's a one-liner, and instructions were updated to make it clear what to do on post type creation.
Closes #115
To Validate
npm start
npm run generate:post-type
and answer the prompts to create a new custom post type, like "Recipes"enable_custom_posts_in_archives
function?tag=<tag-slug>
) to confirm all posts with that tag are rendered?cat=<category-id>
) to confirm all posts with that category are rendered?m=2023
) to confirm all posts authored in the given year are rendered?post_type=<post-slug>
) and confirm that only posts from the custom post type are rendered