=== SuperLight CPT Manager ===

Contributors: RyanEdmunds

Tags: custom post type, cpt, shortcode, lightweight

Requires at least: 5.5

Tested up to: 6.9

Stable tag: 1.2.1

License: GPLv2 or later

License URI: https://www.gnu.org/licenses/gpl-2.0.html


Create and manage custom post types instantly. Each CPT gets its own shortcode.



== Description ==



SuperLight CPT Manager is a minimalist WordPress plugin that lets administrators create Custom Post Types without clutter or bloat.



Each CPT automatically:

- Registers itself with WordPress (visible in menus and REST API)

- Supports basic post features (title, editor, thumbnail, excerpt)

- Comes with a unique shortcode (e.g. `[superlight_cpt slug="book"]`)



There are no extra scripts, no custom tables, and no unnecessary settings — just pure, clean functionality in under 200 lines of PHP.



**Features**

* Add, import/export, or delete custom post types on the fly

* Each post type gets its own shortcode

* Works instantly with Query Loop and block editors (`show_in_rest` enabled)

* All CPTs stored in a single WordPress option (`superlight_cpts`)

* No dependencies, no setup, no nonsense



== Installation ==



1. Upload the plugin folder to `/wp-content/plugins/superlight-cpt-manager/`

2. Activate it from **Plugins → Installed Plugins**

3. Open **CPT Manager** in the WordPress admin menu

4. Add a new post type (e.g. Name: “Books”, Slug: `book`)

5. Use the shortcode `[superlight_cpt slug="book"]` anywhere to list posts or use the Query Loop block to create a custom post type archive.



== Frequently Asked Questions ==



= Why aren’t my CPTs showing in the Query Loop or block editor? =

Version 1.2 and later registers CPTs with `show_in_rest => true`, so they appear in Gutenberg and block-based queries.



= Does it create new database tables? =

No. All CPT definitions are saved as one serialized option in the database.



= What’s the shortcode format? =

Use `[superlight_cpt slug="your_post_type_slug"]` — it will automatically list posts of that type.



= Can I customize the output? =

Yes, you can use a Query Loop block to have total control over the output. You can also override the shortcode loop template directly in your theme if desired, or edit the plugin’s shortcode function.

= Does it work with existing CPTs? =

Superlight CPT's custom posts types will not interfere with existing post types. If a Custom Post Type with the same slug already exists, SuperLight CPT Manager will not override it. Disable the existing CPT registration source to migrate ownership.

== Screenshots ==

1. Clean, dedicated admin screen for creating Custom Post Types.

2. Custom Post Types displayed using the Query Loop block in the block editor.


== Changelog ==

=1.2.1=

* Clarified feature descriptions in the readme.

* Added screenshots.

* No functional changes.

= 1.2 =

* Added `show_in_rest` support for block editor and Query Loop visibility

* Improved shortcode output for CPT listings

* Minor UI and sanitization improvements



= 1.1 =

* Added CPT delete and import/export functionality

* Improved option storage system



= 1.0 =

* Initial release — create and register CPTs via admin page



== License ==

This plugin is licensed under the GPLv2 or later.

