fbpx

The FutureProof Blog

The Ultimate Guide to WordPress Custom Post Types

Over the past 20 years, WordPress has evolved from being a simple blogging platform to a powerful content management system that can handle almost every type of website requirement, from simple brochure sites, to large and complicated online stores. One of the developments that have contributed most to this evolution is the ability to create custom post types. In this comprehensive guide, we will cover every corner of WordPress custom post types, exploring their significance, benefits, and how you can effectively create and manage them on your WordPress site.

share...

When we talk about creating custom post types, in a WordPress context, we are referring to features that allow you to create and manage different types of content beyond the default post types of posts and pages that come built in with the platform. Displaying custom post types, or CPTs, enable you to tailor your WordPress website structure to your specific needs, making it more organised and user-friendly, for you, and your customers.

WordPress Custom post types are essentially a way to classify and display content differently based on its purpose. For example, one of the most common CPTs is “product” created by installing the WooCommerce plugin. This allows you to have a separate section on your website dedicated to the products you sell; the “shop” page, with its own unique layout and functionality. This could be done with a standard webpage, but that’s difficult to manage and confusing for customers.

Why are Custom Post Types important?

Custom post types offer so many benefits to you and your website visitors, that can greatly enhance the way you run your site, structure content and analyse data. When you create custom post types, you can categorise and separate different types of content, making it easier for both you and your visitors to navigate through your website. If you run a large website, with a number of different content types, then understanding what’s working, and what isn’t, will be made much simpler with custom post types.

Another significant advantage of a CPT, is the flexibility and customization options that they provide. Using WordPress, with the addition of specific software solutions (or custom code), you can easily extend the functionality of a custom post type by adding custom fields, taxonomies, and metadata, specific to that type of content, and separate from standard WordPress content. This allows you to capture and display additional information tailored to your specific needs, and the needs of your customers, making your website more dynamic and interactive.

The Benefits of WordPress Custom Post Types

At FutureProof Digital we install a custom version of WordPress every time we start with a new client. Along with this install comes Crocoblock Jet Engine, our software of choice for custom post type generation, meta field creation and database management. There are other options of course, and they will be covered later in the post. There are just of the general benefits of CPTs;

  1. Improved Organisation: Custom post types allow you to compartmentalise and structure your content more effectively, making it easier to manage and navigate. Our websites are designed just as much for the person running it, as it is for the person visiting it.
  2. Enhanced User Experience: By separating content into different post types, you can create unique layouts and functionalities tailored to the specific needs of each type, providing a more engaging and intuitive user experience. A product page needs different functions, a different layout and a different design to a blog post.
  3. Increased Flexibility: Custom post types give you the freedom to customise and extend your website’s functionality by adding custom fields, taxonomies, and metadata. You can add custom fields to a standard post, but the ability to customise these for each type of content is hugely valuable.
  4. Better Content Management: Using a custom post type, you can streamline your content creation process. CPTs provide dedicated sections for different types of content, ensuring consistency and efficiency. On high volume websites this can save a huge amount of time.
  5. Improved SEO: Custom post types allow you to optimise your website’s SEO by targeting specific keywords and optimising the structure and display of your content. Your sitemap, that you submit to Google, will be organised and structured correctly… they like that !!

Examples of popular websites using CPTs

To better understand the practical applications of a custom post type, let’s explore some real-life examples of popular websites utilising this powerful feature:

  1. E-Commerce Websites: Many e-commerce websites use a custom post type to manage and display products, customer reviews, and testimonials separately from regular blog posts. In fact “product” used by WooCommerce, the #1 WordPress E-Commerce plugin is itself a post type added automatically, and its archive, the “shop” page.
  2. Real Estate Websites: Real estate websites often utilise custom post types to showcase property listings with custom fields for property details, location, and multimedia content. Jet Engine was designed with this type of site specifically in mind.
  3. Event Websites: Event management websites rely heavily on custom post types to create and manage event listings, allowing for specific details such as date, time, venue, and ticket information. Later we’ll look at The Strokestown Poetry Festival as an example of this.
  4. Portfolio Websites: Designers, photographers, and artists frequently use a custom post type to create dedicated sections for their portfolios, showcasing their work with custom fields, categories, and tags. The portfolio on this website is developed in this way, we have two; “service” and “project” that are linked to each other in the database.
  5. Directory Websites: Directories, such as business listings or job boards, employ custom post types to organise and display content in a structured manner, facilitating easy search and filtering. One of the examples below, The Galway Tour Guides Association is exactly this type of set-up.
The Ultimate Guide to WordPress Custom Post Types

Creating and Managing WordPress Custom Post Types

WordPress provides various methods to manage and create custom post types, catering to users with different levels of technical expertise. In this section, we will explore the two approaches; using plugins or 3rd party software and manual coding the CPT and editing files. We will also look at the various parameters and options available and discuss how to manage them in the WordPress dashboard. For the vast majority of users a plugin is the way to go. We are using CPTs every single day here at FutureProof Digital and we use Jet Engine, it really is the best way.

How to create a Custom Post Type in WordPress

There are two ways to create a custom post type in WordPress; using plugins and manually coding them in your theme’s functions.php file. We’ll take a quick look at the coding option first, because I want to spend the majority of our time on software options.

Manually creating Custom Post Types in functions.php

For users comfortable with coding, manually creating custom post types in php file of your theme can be a viable option. Here’s a basic example of how to create a custom post type using code:

				
					function custom_post_type_example() {
    $labels = array(
        'name' => 'Example',
        'singular_name' => 'Example',
        'menu_name' => 'Examples'
    );

    $args = array(
        'labels' => $labels,
        'public' => true,
        'has_archive' => true,
        'supports' => array('title', 'editor', 'thumbnail'),
    );

    register_post_type('example', $args);
}
add_action('init', 'custom_post_type_example');

				
			

In this code snippet, we define the labels, settings, and capabilities for our custom post type ‘example’. We then use the register_post_type() function to register the custom post type with WordPress.

Using plugins to create Custom Post Types

WordPress offers a range of plugins that simplify the process of creating a custom post type. Popular plugins include Custom Post Type UI, Toolset Types, and Pods. These plugins provide user-friendly interfaces where you can define the custom post type’s settings, labels, and even add custom fields.

To create a custom post type using a plugin, you typically install and activate the plugin, navigate to the plugin’s settings page, and follow the provided instructions to configure your custom post type. The plugin will handle the necessary coding and database modifications behind the scenes.

Crocoblock Jet Engine

Here at FutureProof Digital we use Crocoblock Jet Engine exclusively, for everything dynamic and database related, including CPTs, meta fields and post relationships. It stands out as an advanced, yet user-friendly solution tailored for the needs of WordPress developers. Dynamic content, custom post types, meta fields, and post relationships are crucial components in our process, and how we create tailored user experiences for our clients and their customers. Jet Engine brings all the required elements together (not 3-4 different plugins), providing a comprehensive platform to design and develop sophisticated websites without the need for complicated code.

WordPress offers a limited set of post types, posts, pages for example, the default post types. While these are suitable for basic blogs or simple websites, they can be restrictive when more intricate experiences need to be designed or the site is large in terms of structure. Jet Engine steps into this gap, extending WordPress’s native capabilities to accommodate every type of dynamic content. This dynamic content allow developers to design unique content structures that cater to specific niches or business needs. As we’ve seen above, a real estate website can have ‘Property’ as a custom post type, while a book review site might have ‘Book’ and ‘Author’ as post types.

When we create custom post types, meta fields are what we use to customise the new post type. Jet Engine’s intuitive interface facilitates the addition of these meta fields, streamlining the development process and ensuring a rich, detailed content structure. Another of the more complex aspects of web development is establishing relationships between different types of content. Consider a scenario where an online magazine site has post types for “Authors” and “Articles.” Jet Engine’s post relationship feature makes this task a breeze. Such functionality not only enhances the depth and interactivity of a website but also optimises the user experience, making content discovery and navigation more intuitive.

The concept of dynamic content is central to web design. Static pages have given way to dynamic interfaces where content changes based on a predefined set of variables. Jet Engine is adept at handling dynamic content, allowing us to create templates that auto-populate with data from the backend. These capabilities ensure that your website remains fresh, relevant, and engaging. Jet Engine’s dynamic content features ensure that websites are always up-to-date and in tune with user preferences.

learn more about Jet Engine…

Understanding CPT Parameters & Options

When creating CPTs, you have a number of parameters and options at your disposal to define their behaviour and appearance. Some come as standard with WordPress, but they can also be defined on a use case basis.

Labels and naming conventions

Labels define how your custom post type is displayed in the WordPress dashboard and on the front end of your website. You can specify different labels for singular and plural forms of the post type, as well as the menu name. This can be very important during our client training process, and in the video guide. The website admins have to understand what they are editing.

Capabilities and permissions

CPTs inherit capabilities from the default post type, but you can modify them to suit your needs. This allows you to control who can create, edit, delete, and view the custom post type. In large organisations it may be required to give a certain level of staff member access to some editing features and not others.

Custom taxonomies and metadata

You can associate custom taxonomies with a custom post type to further classify and organise the content. Taxonomies can be hierarchical (like categories) or non-hierarchical (like tags). CPTs can also use the standard categories and tags that come with WordPress.

Hierarchical vs. non-hierarchical

By default, a custom post type behaves as non-hierarchical, similar to a regular post. However, you can make them hierarchical, like pages, if the content structure requires it. This allows for parent-child relationships, useful for creating nested content.

Managing & Editing CPTs in the WordPress Admin

Once you have created your custom post type, you can manage and edit them through the WordPress dashboard. Each custom post type will appear as separate menu items, similar to regular posts and pages. In the dashboard, you can add new posts, edit existing ones, and delete them. You can also view and edit the various custom taxonomy options.

Managing, editing and displaying custom post types in the dashboard is intuitive and user-friendly, allowing you to streamline your content creation and administration process effectively. A FutureProof Digital client gets a custom user dashboard, with each CPT clearly labelled for easy editing.

Custom WordPress Admin Dashboard

Advanced Custom Post Type Techniques

Creating and managing a custom post type is just the beginning. In this section, we will explore advanced techniques that allow you to take your custom post types to the next level. We will discuss customising archive and single post templates, extending the functionality of a CPT with custom meta fields and meta boxes, enabling search and filtering, creating relationships between custom post types, and integrating custom post types with your plugins and theme.

Customising the Archive & Single Post Template

The archive template is responsible for displaying a list of posts belonging to a specific custom post type, while the single post template is used to display a single post of that custom post type. Just think, shop page and single product page. Customising these templates allows for full control over the appearance and layout of your website, and all the various archives and single post pages.

To customise the archive and single post templates of a custom post type, you’ll need to create template files in your theme’s folder. For example, if your custom post type is called “portfolio”, you can create archive-portfolio.php and single-portfolio.php files. These files will be used by WordPress to render the respective pages. Within these template files, HTML, CSS, and PHP is used to design and structure your custom post type pages as desired. But we use a better way…

Elementor Pro Theme Builder

To effectively display CPTs on the frontend of your website, the design of archive templates and single post templates is essential. The Elementor Pro Theme Builder, offers a streamlined process for this, without the need for adding or editing template files

For archive templates, which provide an overview of multiple entries of a CPT, the Elementor Theme Builder brings simplicity and efficiency to the table. Using dynamic widgets, “Archive Title” for example, it becomes straightforward to extract and display content specific to the CPT, creating a consistent listing page tailored to the respective content type.

The single post template is the individual presentation of each entry in a CPT. This is the detailed view that a user sees when selecting a specific item from the archive page. With the Theme Builder, the process to design this is similar to that of archive templates. The dynamic widgets fetch content automatically from the specified CPT, ensuring each post is displayed properly while maintaining a uniform template structure.

Extending Custom Posts with Custom Meta Fields

Custom fields and meta boxes allow you to add additional data to your custom posts. This opens up endless possibilities for collecting and displaying specific information related to your content. There are several plugins available, Advanced Custom Fields for example, but again, we use Crocoblock Jet Engine, for its user-friendly interfaces. For example, if you have a post type “books” you can add custom fields like “author”, “publication date”, and “ISBN”. These fields are displayed on the edit screen of each book post, allowing you to input and store relevant information.

Enabling Search & Filtering Options

By default, WordPress includes search functionality for posts and pages. However, if you want to provide search capabilities specifically for your custom post type, you’ll need to enable it separately. Crocoblock has search and filter software specifically designed to work hand-in-hand with Jet Engine. It allows you to configure the search behaviour, customise the search results template, and provide advanced filtering by custom fields or taxonomies.

CPT Database Relationships

Sometimes, you may need to establish relationships between different custom post types. For example, if you have a custom post type for “projects” and another for “team members,” you might need to associate specific team members with each project, a project they worked on for example. To create these relationships, you can use a plugin like Posts 2 Posts or Advanced Custom Fields, but again, Jet Engine takes care of this with ease. It allows you to define and manage relationships between post types, enabling you to establish connections and display related content.

Creating relationships between custom post types adds depth and interactivity to your website. It allows you to showcase related content, create complex navigation structures, and provide a seamless browsing experience for your visitors.

Integrating CPTs with WordPress Plugins

Custom post types will seamlessly integrate with various WordPress plugins and themes, further extending their functionality and design possibilities. Many plugins are specifically designed to work with custom post types, providing additional features and options tailored to their unique requirements. For example, if you have an events based website, you can find plugins that offer event management features like event registration, ticketing, and calendar integration, as well as an “events” CPT.

Booking Calendar - WordPress Custom Post Types

Custom Post Types Best Practice

Creating and managing custom post types in WordPress requires careful planning and consideration. In this section, we’ll look at some best practices to help you utilise custom post types effectively and efficiently. We’ve been implementing CPTs for our clients over many years so we know how to best utilise them, and all of the potential pitfalls.

Planning & Designing Custom Post Types Effectively

Before creating a custom post type, it’s essential to plan and design it effectively to ensure they meet your website’s goals and requirements. It’s way easier to plan them right from the start than it is to repair mistakes later, especially once URLs are generated and drawing traffic.

  • Identify the purpose: Clearly define the purpose of your custom post type and what type of content it will hold. Consider the specific functionality and features you want to incorporate. This should be led by what your business does, what your website does, and the goals of each.
  • Content structure: Determine the structure of your post type, including the fields, taxonomies, and metadata that will be necessary to organise and classify your content effectively. Do this in advance and always prioritise your website visitors and they will want to interact with your site.
  • User experience: Think about how users will interact with your posts. Consider the layout, navigation and interface to ensure a seamless and intuitive experience. Make the CPT templates as dynamic as you can, reducing their number, speeding up your site, and the running of it.
  • Scalability: Plan for future growth and scalability. Anticipate how your custom posts may evolve over time and ensure it can accommodate future content and functionality. The purpose of the posts needs to be specific, but it also needs room to grow if required.

Naming Conventions & SEO

Choosing the right names for your post type is crucial for both user experience and SEO. It will also make the site easier to manage, if it’s obvious what needs to be added or updated.

  • Descriptive names: Use names that clearly represent the purpose and content of your WordPress custom post. This helps users understand the type of content they can expect.
  • Avoid generic names: Avoid using generic names like “custom” or “custom-post-type” as they can be confusing and may conflict with other plugins or themes.
  • SEO-friendly slugs: Ensure that the slug (URL) for your custom post type is SEO-friendly. Use keywords and hyphens to create descriptive and readable URLs.
  • Title and meta tags: Optimise the title and meta tags for your custom post types to improve their visibility in the search results. Use relevant keywords and compelling descriptions.

Optimising Custom Post Types

Efficiently managing a custom post type is essential for maintaining a fast and responsive website. These optimisations are best practice for all archives and single post templates, not just custom ones.

  • Caching: Implement caching, with your hosting provider or by using a plugin, to reduce the server load and improve the overall performance of your custom post type, and your website overall.
  • Image optimization: Optimise images used within your custom post type to reduce file sizes without compromising quality. This improves page load speed. Also utilise lazy loading techniques to load content only when it’s needed, reducing initial page load time.
  • Database optimization: Regularly optimise your WordPress database to remove unnecessary data and improve query performance. There are plugins for this.

Troubleshooting Common Issues with CPTs

While working with a custom post type, you may encounter some of the common issues outlined below, but don’t worry, everything can be fixed if you know how.

  • Plugin conflicts: If you experience issues with your custom post type, check for conflicts with other plugins. Deactivate plugins one by one to identify the conflicting plugin.
  • Permalink issues: If your custom post type permalink is not working correctly, try updating the URLs by visiting the Permalink settings page in the WordPress dashboard. Just click save.
  • Missing data: If data associated with your custom post types is missing, check if any custom fields, taxonomies, or metadata have been accidentally removed or modified. Remember, each data point must be added manually to the template in order for it to be displayed.

Documentation & Training

Documentation plays a vital role in ensuring the smooth management and utilisation of a custom post type. For each client, we document the structure, fields, taxonomies, and any specific configurations related to each custom post type. This documentation will serve as a reference for administrators and content creators and comes in the form of a video guide.

This training can include specific instructions on how to create, edit, and manage content within the post types. By providing comprehensive documentation and training, you empower the website team to effectively utilise the functionality and maintain consistency across your website.

Monitoring & Analytics

To understand how your custom post type is performing and how users are interacting with it, monitoring and analytics are vital. We use Google Site Kit on every website to set Google Analytics and Google Search Console quickly and easily. They provide insights into user behaviour, traffic patterns, and engagement metrics specific to each custom post type you have.

Monitoring and analysing these metrics will help you identify areas of improvement, track the success of your post types, and make data-driven decisions that enhance the user experience and improve your content strategy.

Wanderly Wagon Analytics Report

Real-World CPT Examples

To better understand the practical applications and effectiveness of WordPress Custom Post Types, let’s explore some real-life examples, in the form of our previous clients here at FutureProof Digital. These examples will showcase how different industries and different websites can successfully implement custom post types to enhance their content organisation and user experience.

A Custom Image Gallery for a Carpentry Business

Wilderhut, a carpentry business in Scotland wanted to display the projects they’ve worked on without adding a lot of extra, day-to-day. We opted for a custom post type, “Image Gallery” where visitors can scroll through images and expand images to view more detail.

learn more about this project…

Carpentry Image Gallery

Implementing an Events CPT for a Festival

The Strokestown Poetry festival features several custom post types, primarily “Events” and “Speaker.” They have a many-to-many relationship in the database, ie. an event can have multiple speakers, and a speaker can feature at multiple events. Both CPTs have a lot of meta fields and taxonomies; date, time, location, description, speaker bio, social media links etc. The events are also linked to a WooCommerce product for ticket sales.

learn more about this project…

Strokestown Poetry Fest. Events Programme

Building a Testimonial Post Type for a Tour Guide

Testimonials are a powerful way for businesses to showcase their credibility and build trust with potential customers. By creating a custom post type for testimonials, businesses can collate and display customer reviews in an organised way. Custom fields can be added for customer names, date and more.

In the post below we look at several recent clients in the tourism industry; Wanderly Wagon, a guided tour business on the Aran Islands, and The Galway Tour Guides Association. Both employ a “Review” custom post type to display reviews in different locations around the site. In the case GTGA these review have a database relationship with another CPT, “Tour Guide,” so that reviews for a particular guide are displayed on their profile page.

learn more about tourism websites…

Wanderly Wagon Homepage Review Slider

A Service Post Type for a Beauty Salon Website

The first CPT that many of us will have come across is “Service.” We have them here, on this website; “Web Design” for example, or “SEO Copywriting Services.” For Bliss Beauty & Health in Castlerea, Roscommon we implemented a service custom post type with a “service type” custom taxonomy to reflect the different areas of their business. Each service also targets a search term that will bring in new clients to the business, “Nutrition Coaching” for example, boosting the SEO of the whole site.

learn more about this project…

Bliss Service Archive, WordPress Custom Post Types

Using a Recipe Custom Post for a Food Blog

Food blogs often include a collection of recipes, each with its own set of ingredients, instructions, and images. With a custom post type for recipes, food bloggers can effectively manage and present their recipes. Custom fields can be added for ingredients, cooking times, difficulty levels, and dietary restrictions. With the ability to categorise recipes by cuisine or meal type, visitors can easily find recipes that suit their preferences or dietary needs.

For The Best Free From, a business that sells healthy baking products, we launched a recipe blog in the way described above. The content was designed to bring in traffic looking for healthy recipes, that might then become customers for the products.

learn more about this project…

Recipe Custom Post Type

Your WordPress Custom Post Types

Navigating the intricacies of WordPress is a journey many small business owners take, often recognizing the power and adaptability that the platform offers. WordPress Custom Post Types, as highlighted in this guide, stand out as the prime example of WordPress’s capacity to mould to your business’s evolving needs and demands. Your own custom post types, when employed correctly, can dramatically boost your website’s functionality, creating avenues for content display and management that were previously perceived as complex. It ensures that the digital presence of your business truly mirrors your vision and ethos.

A deep understanding of WordPress, and transforming that knowledge into practical, real-world solutions presents its own set of challenges. The digital landscape is ever-evolving, and standing out requires a harmonious blend of technical prowess and creative insights. This is where FutureProof Digital steps in. We pride ourselves on our WordPress expertise, meticulously crafted to cater to the needs of your business. When you partner with us, your WordPress site will not only leverage the vast potential of Custom Post Types but will also be resilient, future-ready, and in perfect sync with the brand image you envision.

The digital realm is unforgiving. A professionally designed website is more than just aesthetics; it’s about creating user experiences that convert visitors into loyal customers. At FutureProof Digital, every project is a collaboration, ensuring your vision is central to the final product. As a small business owner, if you’re looking to solidify your position in the digital arena and build a website that’s not just functional but also a beacon of your brand’s excellence, we invite you to get in touch with us.

share...

About Adam Bermingham
This blog is dedicated to helping you stay ahead of the curve, with insights into the latest trends, tools, and best practices. Whether you’re a business owner, marketer, or web designer, we have something for everyone. We bring you expert advice, tutorials, and case studies to help you optimise your online presence.

Read More Posts

Add a User to Google Search Console – 5 Easy Steps

Add a User to Google Analytics – 5 Easy Steps

Take your Business to the Next Level !!

We specialise in custom websites for businesses of all sizes, SEO that delivers real results and the crafting of compelling copy for our clients, that stands out in their industries. Our small team works with you to communicate your message clearly and effectively. Whether you run a small business, a personal blog, or an e-commerce site, we are the #1 choice.

Does your business need a new website ?

Does your website need to be updated ?

Does your website need optimising for Google rankings ?

Let’s start a conversation about your business …