Custom Post Type Generator for WordPress

Create ready register_post_type code for a new WordPress content type: projects, services, events or properties, with labels, an icon and features, plus its own taxonomy, no plugins.

Create the code

Generator

Post type

Features

Custom taxonomy (optional)

When do you need a custom post type?

A portfolio

Projects with their own pages and archive, apart from posts.

Properties or branches

Content with its own fields like city and price.

Events and courses

Dates and sign-ups without mixing them into the blog.

Functions and commands you will need

get_postsget_posts( array( 'post_type' => 'project' ) )
Templatesingle-project.php / archive-project.php
Linkget_post_type_archive_link( 'project' )
WP-CLIwp post list --post_type=project

Put the code in a small mu-plugin, not the theme, so the content does not vanish when you switch themes. See WordPress snippets.

Example: a portfolio for a design studio

Create a Projects type with featured image and excerpt, plus a Project type taxonomy. Add projects from the new dashboard menu and show them on the archive page or with an Elementor Posts widget set to the new type.

Key terms

Short definitions of what you meet along the way.

Custom post type
A new content type alongside posts and pages.
Taxonomy
A way to group content like categories and tags; you can make your own.
Dashicons
The WordPress dashboard icon set.

Frequently asked questions

Did not find your answer? Ask us on WhatsApp

Where do I put the code?

Best in mu-plugins, or in a child theme functions.php.

Links to the new type show 404?

Open Settings, Permalinks and click Save once.

Do I need a plugin like CPT UI?

No, the code is enough and lighter. A plugin helps if you want to edit it from the UI.

A fast WordPress site without the headache?

WordPress-tuned hosting with one-click install, backups and Arabic support.

Contact us on WhatsApp