The PR includes the addition of a custom block specifically for selecting a primary category for posts. This development is in progress, with the creation of the block and its features underway.
Use Case
This change enables users to designate a primary category for their posts, which can be used to influence the display and organization of content on their site. It will be particularly beneficial for sites that want to highlight specific categories or manage posts with multiple categories more efficiently.
Acceptance Criteria
[ ] Custom block for primary category created.
[ ] Compatibility with Yoast SEO primary category selection, if installed.
[ ] Use of the first selected category if Yoast SEO is not installed.
[ ] Integration with the plugin templates system as defined in #51.
[ ] Block placed in plugin-templates/blocks/theme-primary-category.
[ ] Namespace set to create-wordpress-plugin.
[ ] Testing with and without Yoast SEO's primary category feature.
[ ] Category of the block set to theme.
Technical Details
The implementation will likely involve registering a new block within the WordPress editor that interfaces with the post's category taxonomy. It will interact with Yoast SEO if available to ensure seamless integration.
Additional Context
During the development process, the idea of making the category taxonomy filterable was considered as a potential improvement. Additionally, creating a block with a taxonomy attribute and using block style variations for different registered taxonomies was mentioned by a community member as a possible enhancement.
Pull Request
Issue Reference
#53 - Create Primary Category Custom Block
Description of Change
The PR includes the addition of a custom block specifically for selecting a primary category for posts. This development is in progress, with the creation of the block and its features underway.
Use Case
This change enables users to designate a primary category for their posts, which can be used to influence the display and organization of content on their site. It will be particularly beneficial for sites that want to highlight specific categories or manage posts with multiple categories more efficiently.
Acceptance Criteria
plugin-templates/blocks/theme-primary-category
.create-wordpress-plugin
.theme
.Technical Details
The implementation will likely involve registering a new block within the WordPress editor that interfaces with the post's category taxonomy. It will interact with Yoast SEO if available to ensure seamless integration.
Additional Context
During the development process, the idea of making the
category
taxonomy filterable was considered as a potential improvement. Additionally, creating a block with a taxonomy attribute and using block style variations for different registered taxonomies was mentioned by a community member as a possible enhancement.Checklist
Screenshots
If you are changing a visual element, a screenshot helps reviewers understand your changes.
Remember to fill out all sections and provide as much information as possible to facilitate the review process.