Notice: This plugin interface and documentation are currently available only in Portuguese. English translation is planned for a future update.
The proposal is simple: structure custom content quickly, especially in development and prototyping environments.
The plugin allows you to create, edit, and delete Custom Post Types using a straightforward interface within WordPress, accelerating the creation of content structures.
Instead of manually registering CPTs with `register_post_type()` in your theme’s code, you define them in the dashboard:
- Name
- Slug
- Icon
- Supports
The created CPTs then function just like any other native WordPress content type.
How it works internally
CPT data is stored in the database using the options table.
During WordPress initialization, specifically at the `init` hook, the plugin iterates through this data and dynamically registers each CPT using `register_post_type()`.
This means:
- There is no need for code within the theme.
- The CPTs remain functional as long as the plugin is active.
- The structure is loaded automatically with every request.
What can be configured
For each Custom Post Type, the plugin allows you to define:
- CPT Name
- Slug
- Icon (Dashicons)
- Supports, such as the editor, featured image, and excerpt.
The slug is automatically generated from the name, with built-in handling to remove accents and invalid characters.
ACF Integration
CPTs created with this plugin work seamlessly with Advanced Custom Fields (ACF). Simply create a field group and set the location rule to the corresponding Post Type. This allows you to build complete content structures without touching the theme’s code.
Behavior when deleting CPTs
- When a CPT is deleted via the plugin:
- The content type is no longer registered.
- Existing content is not deleted from the database.
This is intentional. The goal is to prevent data loss and allow content to be recovered if the CPT is recreated or registered manually later.
Validation and Security
The plugin utilizes:
- Administrative permission checks.
- Nonces for all actions.
- Input data sanitization (`sanitize_`).
There is also validation to prevent duplicate slugs, avoiding conflicts during the CPT registration process.
Technical Considerations
The plugin uses a dynamic approach. The CPTs are not hardcoded in the theme but are registered at runtime based on stored data.
While this offers great flexibility, it also means that the CPTs depend on the plugin to exist.
Conclusion
Nousk CPT Manager is a practical tool for “no-code” Custom Post Type creation. While it doesn’t replace a code-defined architecture when strictly necessary, it works exceptionally well as a support tool for quickly structuring and testing content. The idea is to simplify a common process while maintaining enough control to evolve the project later.