Description
Dynamic CPT Generator is a free, lightweight plugin that lets you create as many custom post types as you need, directly from a simple settings screen — no code, no config files, no developer required.
Every custom post type you create comes with its own shortcode, ready to drop into any post, page, or widget to display your content in a polished List, Grid, or Carousel layout.
Why use Dynamic CPT Generator?
- One-click creation — type a name, pick a layout, click Create. Your custom post type is registered instantly, complete with its own admin menu, categories, and tags.
- Custom Field Builder — add your own Text, Textarea, Number, URL, or Image fields to any custom post type, no code required. Fields show up as a metabox on the edit screen and automatically appear in the frontend display.
- Three built-in display layouts — List, Grid, and a touch-friendly Carousel (powered by Slick Slider), switchable at any time without touching code.
- Shortcode-based output —
[dcptg_display_dynamic_cpt type="yourchosenname"]works anywhere shortcodes are supported, with optionalposts_per_page,orderby,order, andcategoryattributes. - Gutenberg block — add a “Dynamic CPT Display” block from the block inserter and configure it visually, no shortcode typing required.
- Built-in pagination — set
posts_per_pageand visitors get automatic page-number navigation instead of one long list. - Built-in Read More toggle — visitors can expand full content inline without leaving the page.
- Categories & tags support — every generated post type supports standard taxonomies out of the box.
- Lightweight & conditional loading — styles and scripts only load on pages that actually use the shortcode or block, keeping your site fast.
- Safe cleanup — manage or permanently delete a custom post type (and its posts) right from the settings screen.
Common use cases
Dynamic CPT Generator is a popular choice for building:
- Portfolios and project showcases
- Team member / staff directories
- Testimonials and reviews
- Products or services listings
- Events and announcements
- FAQs, case studies, and resource libraries
Use this shortcode anywhere on your site to display a custom post type:
[dcptg_display_dynamic_cpt type="yourchosenname"]
Or filter and paginate the results:
[dcptg_display_dynamic_cpt type="yourchosenname" posts_per_page="6" category="news" order="ASC"]
Customizing the design
Every layout is built from plain, documented CSS classes, so you can restyle the output to match your site by adding CSS in Appearance > Customize > Additional CSS (or your theme’s stylesheet) — no plugin files need editing, and your changes survive plugin updates.
Container classes (one per layout, added to the shortcode/block wrapper):
.dcp-cpt-list— List layout.dcp-cpt-grid— Grid layout.dcp-cpt-carousel— Carousel layout
Classes inside every item, regardless of layout:
.dcp-cpt-item— the card/row wrapper for a single post.dcp-cpt-item img— the featured image (.dcp-no-imageis added when a post has no featured image).dcp-excerpt— the excerpt text.dcp-full-content— the full content revealed by “Read More”.dcp-read-more— the Read More / Show Less toggle link.dcp-cpt-fields— the list of custom field values (if the post type has any).dcp-cpt-pagination— the pagination links (shown whenposts_per_pageis set)
Example — make grid cards use your brand color for the Read More button:
.dcp-cpt-grid .dcp-read-more { background: #111 !important; }
Building your own layout (Custom)
Need full control over the markup instead of just CSS? Pick Custom as the layout for any post type, then open “Custom Template” in the settings screen and write your own HTML using these placeholders — no PHP required:
{title},{permalink},{excerpt},{content}— the post’s own data{image}— a ready-to-use<img>tag (or the built-in placeholder if there’s no featured image);{image_url}gives you just the URL if you want to build your own<img>tag{categories},{tags}— linked term lists{fields}— every custom field for this post type, pre-formatted as a list{field:key}— a single custom field’s value on its own (replacekeywith the field’s name, lowercased)
Example template:
<div class="my-card">{image}<h3>{title}</h3><p>{excerpt}</p><span>{field:price}</span></div>
If a post type is set to Custom but no template has been saved yet, the plugin automatically falls back to its default card layout, so output is never broken.
Blocks
This plugin provides 1 block.
- Dynamic CPT Display
Installation
- Go to Plugins > Add New in your WordPress dashboard.
- Search for Dynamic CPT Generator.
- Click Install Now, then click Activate.
- From the dashboard, go to DCP CPT Generator.
- Enter a name for your custom post type (lowercase letters, numbers, and underscores only).
- Choose a layout: List, Grid, or Carousel.
- Click Create.
- Use the shortcode
[dcptg_display_dynamic_cpt type="yourchosenname"]to display your content.
FAQ
-
Does this work with any WordPress theme?
-
Yes. Dynamic CPT Generator ships with its own self-contained styling for all three layouts, so it works independently of your active theme. You’re also free to override the included CSS classes to match your site.
-
Can I create more than one custom post type?
-
Yes, there’s no limit. Each one gets its own unique name, admin menu, and shortcode.
-
Will deleting a custom post type delete my content?
-
Deleting a custom post type from the settings screen permanently deletes all posts created under it. You’ll be asked to confirm before anything is removed.
-
Can I change the layout after creating a custom post type?
-
Yes. Use the “Update Layout” control next to any registered post type to switch between List, Grid, and Carousel at any time — no need to recreate it.
-
Does the plugin slow down my site?
-
No. Carousel/List/Grid assets are only loaded on pages where the shortcode is actually used, not site-wide.
-
Yes, every custom post type created with this plugin supports standard WordPress categories and tags.
-
Can I add custom fields to a post type?
-
Yes. Open “Manage Fields” under any registered post type and add Text, Textarea, Number, URL, or Image fields. They’ll appear as a metabox when editing posts of that type, and automatically show up in the frontend output.
-
Can I limit how many posts are shown, or paginate them?
-
Yes, use the
posts_per_pageshortcode attribute (or the block’s “Posts Per Page” setting). When set, page-number navigation is added automatically. -
Do I need to use the shortcode, or is there a block?
-
Both are supported. Use the shortcode anywhere, or add the “Dynamic CPT Display” block from the block inserter in the editor for a visual, no-code setup.
Contributors & Developers
“Dynamic CPT Generator” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Dynamic CPT Generator” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
3.0.0
- Added: “Custom” layout option — write your own HTML template per post type using placeholders like
{title},{image},{fields}, and{field:key}. - Improved: Settings screen’s own menu icon is now visually distinct from the icon used by each generated post type.
2.2.0
- Added: Custom Field Builder — add Text, Textarea, Number, URL, or Image fields to any custom post type, editable from a metabox and shown automatically on the frontend.
- Added: New shortcode attributes
posts_per_page,orderby,order, andcategoryfor filtering output. - Added: Automatic pagination when
posts_per_pageis set. - Added: “Dynamic CPT Display” Gutenberg block as a visual alternative to the shortcode.
2.1.0
- Added: Placeholder image for posts without a featured image.
- Improved: Modernized admin settings screen with clearer sections, badges, and an empty-state message.
- Improved: Styles and scripts now load only on pages that use the shortcode, instead of site-wide.
- Fixed: Added nonce verification to the Delete and Update Layout actions.
- Fixed: Custom post type names are now validated against WordPress’s naming rules and checked against reserved/core post type names.
- Added: Clean-up of stored settings and generated posts on uninstall.
1.0.0
- Initial release.
