Custom post types in WordPress are useful when you need to manage recurring content with its own structure, such as projects, events or recipes. I recommend them when they simplify updates and allow you to build consistent archives, without mixing it all up with the blog posts.
For a corporate website, focusing on the design first can mask this need until development has already begun. I prefer to decide first what information you will publish, who will update it and how visitors should be able to find it.
The choice of content type therefore comes before the code.
Key points
- Use a custom post type for recurring content with its own information and structure. For a small number of static pages or simple services, standard pages and posts are often sufficient.
- Distinguish between the content type – which defines what you publish – the taxonomy – which groups the records together – and the custom fields – which store the data for each record.
- You can register types and taxonomies using PHP integrated with
initor use Custom Post Type UI. A custom plugin keeps the functionality separate from the theme. - Registration does not create templates, fields or filters for visitors. It also handles the archive, individual pages, permalinks, indexing, access and maintenance.
When a custom post type enhances a company’s website
A custom content type adds a separate section to the WordPress admin area – the area from which you manage content and settings. However, the mere convenience of having a menu item is not enough to justify it: it must solve a specific organisational problem.
Recurring content featuring original information
A portfolio may include images, the project sector and the services provided. An event may include the date, venue and a link to the booking page. Testimonials, on the other hand, may include the author, their role and the text.
This information appears on every page. It is therefore advisable to define a shared structure, rather than recreating it manually each time. Custom post types distinguish between the pages, whilst custom fields store the additional data.
When creating a company website, this separation also helps those who will be updating it without having to alter the layout.

When pages and articles are enough
For a company website with just a few services and a contact page, standard pages are often sufficient. Even a single landing page rarely requires a new structure.
Products already exist in WooCommerce e-commerce; creating a parallel catalogue without a specific need for it complicates management.
As a freelance WordPress developer, I prefer to add a structure only when it makes the job easier. In my A guide to building WordPress websites I’ll go into more detail about this objective-based approach.
Content types, taxonomies and fields: what’s changing
Some of the best-known predefined content types include post, page e attachment, i.e. posts, pages and multimedia attachments. WordPress also uses others for internal functions.
A custom post type adds a type of post, whilst a taxonomy groups content together. Categories and tags are predefined taxonomies. Custom taxonomies allow you to classify posts according to project-specific criteria.
To distinguish between the three levels, I consider these uses.
| Instrument | Function | Example |
|---|---|---|
| Content type | Think about what you post | Recipe |
| Taxonomy | Group related tabs | Italian cuisine |
| Custom field | Save a piece of data from the record | Preparation time |
This distinction avoids using categories as containers for information that actually belongs to the individual record.
For a food company, recipes may therefore have taxonomies dedicated to cuisines and ingredients. Preparation time remains a single field. The official function for recording classifications is register_taxonomy().
A custom post type does not automatically create custom fields or public filters: these features require additional development or configuration.

Registering a custom post type using PHP code
To test it, you can enter the code in functions.php of a child theme, including backups and a test environment. I avoid making changes to the main theme because an update might overwrite them.
The documentation on content registration indicates init as a suitable hook. The phrase ‘add_action init’ summarises the linking of the registration to init via add_action(). This example records recipes and two associated taxonomies.
function af_registra_ricette() {
// Classificazioni disponibili per le ricette.
register_taxonomy( 'af_cucina', 'af_ricetta', array(
'label' => 'Cucine',
'hierarchical' => true,
'show_in_rest' => true,
'show_admin_column' => true,
) );
register_taxonomy( 'af_ingrediente', 'af_ricetta', array(
'label' => 'Ingredienti',
'hierarchical' => false,
'show_in_rest' => true,
'show_admin_column' => true,
) );
// Tipo di contenuto pubblico con archivio.
register_post_type( 'af_ricetta', array(
'labels' => array(
'name' => 'Ricette',
'singular_name' => 'Ricetta',
),
'public' => true,
'has_archive' => true,
'show_in_rest' => true,
'supports' => array( 'title', 'editor', 'thumbnail' ),
'rewrite' => array( 'slug' => 'ricette' ),
'menu_position' => 5,
'menu_icon' => 'dashicons-food',
'taxonomies' => array( 'af_cucina', 'af_ingrediente' ),
) );
}
add_action( 'init', 'af_registra_ricette' );
labels defines the names in the administration. public makes the type public, whilst has_archive Enable the archive. show_in_rest enables the use of the block editor, along with support for editor.
supports Set the title, content and featured image; the latter also requires support from the theme. Finally, rewrite It defines the public slug, whilst ‘position’ and ‘icon’ relate to the admin menu.
Choosing between a visual interface and a dedicated plug-in
The choice depends mainly on who will be responsible for maintaining the configuration. Both methods can record the same content.
Creating the structure using Custom Post Type UI
You might come across the variant “Custom Post Types UI”, but the official name is Custom Post Type UI, a custom post type plugin.
This WordPress plugin allows you to create content types and taxonomies without writing any PHP. You can configure the identifier, labels, visibility, archive and media types via the interface.
The WordPress plugin records the structure, but does not automatically create a customised presentation on the website.
The export function generates reusable PHP code. You can transfer it to functions.php, but for a corporate website I’d recommend a custom plugin. Once the registration has been transferred, you can deactivate CPT UI to avoid duplicate registrations.
This choice may reduce the plugin’s load, but it does not guarantee an improvement in speed.
Separating functionality from the theme
To prepare the solution, add a folder to /wp-content/plugins/, for example af-content, and a main file af-content.php. The file begins as follows:
<?php
/*
Plugin Name: Company Content
*/
Immediately afterwards, enter the previous function and its add_action(). Then activate the solution from the WordPress admin area.
A custom plugin separates functionality from the theme, ensures that content is still recorded when you change themes, and allows you to reuse the code.
My Custom Functions, on the other hand, allows you to insert PHP code from Settings > PHP Inserter, without modifying the theme files via SFTP. You remain responsible for managing the code, ensuring compatibility and carrying out maintenance.
Display the archive and individual entries on the website
Recording prepares the content, but how it is displayed depends on the active theme and the configuration of the tools used.
Templates for archive and detail pages
In classic themes, WordPress looks for archive-af_recipe.php for the archive and single-af_recipe.php for each individual recipe. If any are missing, apply the available templates according to your own hierarchy.
I template for custom post types allow you to separate the list of records from the details page.
With block-based themes, however, HTML templates and the site editor come into play. When using Elementor or other tools, you need to consider the features available in the chosen configuration.
I also design clear headings, keyboard navigation and adaptable images: an archive must work well on a responsive website.
Queries, filters and issues with permalinks
To retrieve recipes from a custom list, a query WP_Query must specify 'post_type' => 'af_recipe'. To filter a taxonomy, you use tax_query.
The inclusion of taxonomy within the administration does not, in itself, provide a filter for visitors. Furthermore, extensive lists require appropriate pagination.
If archives or pages return a 404 error after saving, save the permalink settings again. Avoid running flush_rewrite_rules() every time it is loaded.
During a website redesign, however, changing the URLs also requires managing redirects from the old pages.
Technical SEO and maintenance: to be planned together
A custom post type organises content, but it does not automatically improve a website’s search engine ranking. The quality of the pages remains the key factor.
Useful archives and public content
When it comes to technical SEO for WordPress, I consider which archives serve a genuine purpose. A collection featuring well-curated entries, descriptions and relevant links can improve navigation. On the other hand, many nearly empty taxonomies simply add pages that provide little information.
The type of content must have settings that are consistent with the sitemap, indexing and internal links. These aspects fall within my remit best practices for WordPress websites.
Please also bear in mind the need for confidentiality: public => true It is not suitable for documents intended for a customer portal. Specific visibility settings and access controls are required.
Performance and business continuity
When optimising speed, I take into account queries, images, loaded resources and the cache. The number of plugins alone does not determine how heavy the site is.
WordPress maintenance must also cover custom code, dependencies and compatibility following updates. I therefore keep a record of where the content is stored and who is responsible for the site’s support.
Once published, Search Console helps you monitor your visibility in search results. Events set up in Analytics, on the other hand, allow you to measure actions such as form submissions. These are separate from the development of the site’s structure.
Frequently asked questions about custom post types
Will the content disappear if I deactivate the plugin?
They generally remain in the database, but the type is no longer recorded. As a result, administrative details and public addresses may become unavailable until you restore the record.
How much does it cost to add them to a company website?
Costs and timelines depend on the objectives, content, pages, fields, templates, features, integrations and the condition of the existing website. Registration is just one part of the work.
A structure that remains useful even after launch
I recommend custom post types when they make the content easier to manage and provide visitors with clear navigation paths. For a few static pages, I prefer to keep the structure simple.
The decision must also take into account display, maintenance and continuity following a theme change. It is this combination that makes customisation sustainable.
I work from Ciampino, in the Rome area, and provide online support to businesses throughout Italy. If you need to create or revamp your company website, Let’s talk about your website project.