Directory / plugin
Dynamic CPT Generator
v3.0.0 · by Nancy
Create custom post types with your own custom fields in one click, and display them with a shortcode or block — List, Grid, or Carousel layout.
About this plugin
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.