You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature will introduce the ability to disable single post views for custom post types within the Wetu Importer. The functionality will allow users to disable individual single post views via the post editor screen as well as disable all singles globally for a given post type from the plugin’s settings page.
Task 1: Add Disable Option on Single Post Editor Screen
Add Disable Option for Each Post Type:
Implement a disable toggle on the single post editor screen for each post type. This option will allow users to disable the single post view for individual posts within custom post types.
Example:
A checkbox labeled "Disable Single View for this Post" in the post editor sidebar.
Ensure Dynamic Post Type Support:
Make sure the feature works dynamically for all custom post types registered within the Wetu Importer, allowing flexibility for any additional post types.
Task 2: Add Disable Option on Plugin Settings Page
Global Disable Option by Post Type:
Introduce a setting on the plugin settings page where users can globally disable single views for specific post types.
Example:
A settings section that lists all registered post types with checkboxes to enable or disable single views for each post type.
Label: "Disable All Single Views for [Post Type]" with a checkbox per post type.
Handle Global Disable Logic:
Ensure that when this global disable option is selected, it overrides individual post settings and disables all single post views for the selected post type.
Additional Considerations
Ensure that disabling single views properly redirects users to an archive or 404 page (or any specified page) when attempting to access a disabled single post.
The settings should be easy to toggle on/off without requiring extensive technical knowledge.
Properly test and ensure compatibility with existing post types and custom post types.
Completion Criteria
Single post views can be disabled both individually (per post) and globally (per post type).
Rewrite rules are correctly updated to handle the disabled single views.
Users are redirected to the appropriate pages when trying to access disabled single post views.
Setting - Disable Singles #367
Overview
This feature will introduce the ability to disable single post views for custom post types within the Wetu Importer. The functionality will allow users to disable individual single post views via the post editor screen as well as disable all singles globally for a given post type from the plugin’s settings page.
Task 1: Add Disable Option on Single Post Editor Screen
Add Disable Option for Each Post Type:
Implement a disable toggle on the single post editor screen for each post type. This option will allow users to disable the single post view for individual posts within custom post types.
Example:
Ensure Dynamic Post Type Support:
Make sure the feature works dynamically for all custom post types registered within the Wetu Importer, allowing flexibility for any additional post types.
Task 2: Add Disable Option on Plugin Settings Page
Global Disable Option by Post Type:
Introduce a setting on the plugin settings page where users can globally disable single views for specific post types.
Example:
Handle Global Disable Logic:
Ensure that when this global disable option is selected, it overrides individual post settings and disables all single post views for the selected post type.
Additional Considerations
Completion Criteria