Skip to content
My Blog

Search WPDesignVault

Try "image", "json", "schema" or "contrast". Use arrow keys to move through results.

WordPress Tools

Custom Post Type Generator

Generate clean, translation-ready register_post_type() code for WordPress with labels, supports, archives and block editor settings.

Runs in your browser. Nothing you enter is uploaded. Last updated
Supports
Options

How to use

  1. Enter the post type key and its singular and plural names.
  2. Pick the features it supports and whether it has an archive and appears in the block editor.
  3. Copy the code into a small plugin (recommended) or your theme’s functions.php, then save Settings → Permalinks once.

What this tool does

It outputs a function hooked to init that registers your post type with a complete set of labels wrapped in translation functions. The key is validated against WordPress rules (20 characters, lowercase letters, numbers, dashes and underscores).

Why it matters

Custom post types keep different kinds of content, such as portfolio items or tools, separate from posts and pages, with their own URLs, archives and admin screens.

Tips

  • Register post types in a plugin so the content does not disappear when you change themes.
  • Enable show_in_rest to use the block editor and the REST API.
  • Avoid reserved keys such as post, page, attachment, revision or action.

Frequently asked questions

Why do I get a 404 on my new post type?

Visit Settings → Permalinks and click Save to rebuild rewrite rules.

wp-config.php Generator

Generate a complete wp-config.php with database details, newly generated security keys, debug settings and useful constants. Keys are…

WordPress .htaccess Generator

Generate a WordPress .htaccess file with the default rewrite rules and optional HTTPS and www redirects, file protection,…

URL Slug Generator

Convert titles into short, lowercase, SEO-friendly URL slugs. Removes accents and symbols, with optional stop-word removal. Works on…

301 Redirect Generator

Paste old and new URLs to generate exact-match redirect rules for Apache (.htaccess), Nginx or a WordPress snippet.…