Custom post types let WordPress model content that needs its own fields, editorial workflow, taxonomies, queries, or templates instead of being forced into ordinary posts or pages. This updated guide revisits the 12 tutorial themes identified in a June 8, 2015 WPBeginner video transcript and aligns them with current WordPress registration, REST API, block-editor, search, and theme-development behavior.
Use the first tutorial to decide whether you need a custom post type at all, then work through only the features your content model requires. The original list is a useful map of tasks, not a claim that these are the twelve most important tutorials for every modern WordPress site.
Before you build: decide whether a custom post type fits
A custom post type (CPT) is a distinct content type stored in WordPress’s normal posts table. WordPress core provides APIs to register, retrieve, query, and render it; a third-party plugin is optional.
Use a CPT when the content has a different job
- It needs fields or editorial steps that do not fit posts or pages.
- Readers will browse it through its own archive, URL pattern, navigation item, or filters.
- Editors need a separate admin menu and permissions boundary.
- The content should remain separate from the blog chronologically.
Keep posts or pages when the difference is only presentation
A new color scheme, landing-page layout, or a handful of extra fields does not automatically justify a new type. Use categories, tags, custom fields, or a page template when the underlying content and workflow are still the same. Creating a CPT too early can make search, migration, templates, and permissions more complicated.
Recommended Free Tools
#1 Best Overall
Choose where registration lives
For content that must survive a theme change, register the type in a plugin. A theme-based registration can make the content disappear from the admin when that theme is replaced, even though the database records still exist. A theme is appropriate only when the content is inseparable from that theme’s presentation.
1. Register a custom post type correctly
Register the type on or after the init hook. Make each visibility decision deliberately rather than treating “public” as one switch.
function ig_register_book_type() {
register_post_type( 'book', array(
'labels' => array(
'name' => 'Books',
'singular_name' => 'Book',
),
'public' => true,
'show_in_rest' => true,
'has_archive' => true,
'rewrite' => array( 'slug' => 'books' ),
'supports' => array( 'title', 'editor', 'thumbnail' ),
'taxonomies' => array( 'category' ),
) );
}
add_action( 'init', 'ig_register_book_type' );
The supports array controls editor features; has_archive controls whether a conventional archive is available; rewrite influences front-end permalinks; taxonomies associates classifications; and show_in_rest exposes the type to the REST API and enables block-editor support. Register any custom taxonomy separately even when it is listed in the post type’s taxonomies argument.
2. Add a custom icon to the admin menu
Distinct icons help editors identify several content types quickly. The menu_icon argument accepts a Dashicon name, a data URI, or an image URL. A Dashicon is usually the most portable choice:
'menu_icon' => 'dashicons-book'
Choose an icon that remains recognizable at the small admin-menu size. This affects the dashboard only; it does not change the front-end design or the type’s URL.
Rank #2
3. Create and design the CPT archive
Set has_archive to true (or to a custom slug) when readers need a conventional listing page. After registering or changing rewrite settings, visit Settings > Permalinks and click Save Changes to flush rewrite rules without code.
Template hierarchy
A theme can provide archive-{post_type}.php for the type’s archive and single-{post_type}.php for an individual item. If those files are absent, WordPress falls back through the normal template hierarchy. A custom listing built with a bespoke query may be better when the archive needs featured items, complex filters, or a layout unlike a standard archive.
4. Add an RSS feed for one custom post type
WordPress can expose a feed for a post type when the type is public and queryable. A dedicated feed normally follows the site’s feed URL conventions with the post-type query, but the exact URL depends on the site’s permalink and feed configuration. Test the generated link rather than assuming a slug.
Use the feed template and query filters only when the default output does not contain the fields or ordering subscribers need. Validate the feed as XML and keep titles, dates, permalinks, and summaries meaningful for feed readers.
5. Include CPT items in the main site feed
The main feed is a separate query from a CPT’s own feed. If a type should appear alongside ordinary posts, alter the main feed query conditionally rather than making every query on the site broader.
Rank #3
Decide what belongs in the combined feed
- Include only content intended for the same audience and publication cadence.
- Keep private, internal, or highly specialized records out of a general subscriber feed.
- Check ordering and pagination after changing the query.
Test both the home page and feed-specific requests. A query modification that works for the front page can unintentionally affect admin screens, REST responses, or secondary loops if it is not scoped to the main feed query.
6. Make custom post types searchable
Search visibility has several independent parts: the type must be registered for public queries, the search query must include it, and the theme’s results template must render it usefully. Do not assume that a public admin menu automatically puts items into front-end search.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsChecklist
- Confirm the registration settings permit public queries and search where intended.
- Check the search query with a term that appears in the title and another that appears in the content.
- Make sure the result template displays the type label, title, permalink, date, and an appropriate excerpt.
- If custom-field values must be searchable, use a deliberate indexed-search solution; core title/content search does not automatically search every custom field.
7. Make CPT items “sticky” without assuming post stickiness
WordPress’s built-in sticky-post flag is designed for the standard post type. A custom type needs an explicit design for featured ordering, such as a meta field, taxonomy term, or a dedicated “featured” status, followed by a query that orders matching items first.
A maintainable featured-item pattern
- Add a boolean or date field named for the business meaning, such as
featured_book. - Let editors set it in the block editor or a controlled meta box.
- Order the archive query by that value and then by publication date.
- Define what happens when several items are featured and how the setting expires.
This approach is clearer than copying the standard sticky flag into a type for which core templates may not honor it.
8. Disable Disqus comments for a custom type
Comment systems usually decide whether to render from the post’s comment settings, post type, or a plugin-specific filter. Disable comments at the content-model level if the type should never accept discussion, then verify the Disqus integration does not inject its own container regardless of the WordPress setting.
Safe implementation checks
- Turn off comments for new items in the editor and, if necessary, bulk-edit existing items.
- Check the single-item template for a hard-coded comments or Disqus call.
- Test an existing item, a new item, and a logged-out browser session.
- Keep moderation and privacy settings consistent with the rest of the site.
9. Accept user-submitted content
User submissions require more than a front-end form. The workflow must validate input, prevent unauthorized actions, handle uploads safely, and keep submissions out of publication until a trusted editor reviews them.
Free tools Windows power users keep installed
One-click scans. No signup required.
Minimum workflow
- Authenticate or rate-limit the submitter according to the site’s risk level.
- Use nonce checks and capability checks on every submission.
- Sanitize text, validate allowed values, and restrict file types and sizes.
- Create the item with a non-public status such as
pending. - Notify editors and provide an approval, revision, or rejection path.
- Escape values on output and log failures without exposing sensitive data.
A form plugin can provide parts of this workflow, but its settings and generated fields still need security and moderation review.
Rank #4
10. Convert content from one post type to another
Conversion is a data migration, not merely a label change. Before changing types, record the source and destination, back up the database, and check how templates, taxonomies, custom fields, comments, authors, and URLs map across.
Conversion checklist
- Stage the operation and test with a small batch.
- Confirm the destination type is registered before conversion.
- Preserve or deliberately transform metadata and taxonomy relationships.
- Review redirects when the permalink structure changes.
- Verify search, feeds, REST responses, and editor screens afterward.
The WordPress.org directory lists Post Type Switcher as an example of software relevant to this task. Treat it as a tool option, not a requirement, and inspect its current compatibility and workflow before using it on production data.
11. Relate post types and taxonomies
Relationships answer two different questions: which items belong to a classification, and which individual items are connected to one another. Taxonomies are appropriate for reusable terms such as genres, regions, or topics. A relationship field or another explicit link is better for “related book,” “speaker,” or “course includes lesson” connections.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Model the relationship before implementing it
- Use a taxonomy when readers need to filter or browse a shared set of terms.
- Use custom fields or relationship data when one item points to specific other items.
- Define whether the relationship is one-to-one, one-to-many, or reciprocal.
- Decide how deleted or unpublished related items should appear.
Register the taxonomy explicitly and associate it with the post type through the registration settings so admin behavior and queries remain consistent.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.12. Add custom meta boxes and fields
Custom fields store attributes of an individual item: ISBN, event date, price, coordinates, or a related object. A meta box is the editor interface for entering those values; it is not a replacement for a taxonomy or a post type.
Best Value
Choose the smallest suitable field model
| Need | Usually suitable | Why |
|---|---|---|
| Reusable categories or filters | Taxonomy | Terms can be shared, queried, and browsed. |
| One item’s descriptive attribute | Post meta/custom field | The value belongs to that item. |
| Separate workflow, archive, or permissions | Custom post type | The content is a distinct editorial entity. |
| Complex linked records | Relationship fields or a dedicated data model | Explicit links are easier to query and maintain. |
Advanced Custom Fields is a commonly used plugin example for building field interfaces, but it is not required: WordPress’s metadata APIs and custom meta boxes can implement the same model in code. Whichever approach you use, register fields deliberately, validate and sanitize values on save, check nonces and capabilities, and escape them when displayed.
Code registration or a dashboard plugin?
| Approach | Strengths | Trade-offs |
|---|---|---|
| Code in a plugin | Portable, version-controlled, precise, and independent of the active theme | Requires PHP and deployment discipline |
| Code in a theme | Convenient when the type exists only for that theme’s design | The admin content can disappear when the theme changes |
| Plugin UI | Accessible to non-developers and quick to prototype | Settings depend on the plugin and may require migration if it is removed |
Whichever route you choose, document the slug, labels, taxonomies, rewrite rules, REST behavior, and migration plan. A working registration is only the beginning; templates, queries, permissions, and editorial training determine whether the type remains maintainable.
Public pages, REST API, and the block editor are separate decisions
A type can be visible on the front end without being available through the REST API, or available to the API without having the archive layout you want. Check each requirement independently:
- Front-end visibility: public registration, queryability, rewrite rules, and templates.
- Admin editing: menu visibility, capabilities, editor supports, and labels.
- Block editor and REST:
show_in_rest => true, plus any REST-specific configuration. - Classification: explicit taxonomy registration and association.
- Archives:
has_archiveand an appropriate archive template or custom query.
For API-enabled content, test authenticated and unauthenticated requests, item and collection endpoints, pagination, permissions, and the fields your client actually needs. The WordPress REST API documentation has separate guidance for custom content types.
How to test a new custom post type
- Activate the plugin or code on a staging site and confirm the admin menu and editor supports.
- Create, update, trash, restore, and preview an item.
- Check its single URL, archive URL, navigation links, canonical URL, and 404 behavior.
- Search by title and body; test taxonomy archives and any custom-field filters.
- Open the main feed, dedicated feed, and REST endpoints if enabled.
- Test roles with fewer capabilities than an administrator.
- Switch themes on staging to confirm content persistence and fallback behavior.
- Flush permalinks once after registration changes, then avoid flushing on every request.
Keep the type only if its structure improves editing and discovery enough to justify the added templates, queries, and maintenance.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →

