No matter what your aim is when you have a website, it’s going to be preferable if you’re able to stand out from the crowd. After all, it’s almost certain that there’s plenty of similar sites all over the world wide web with people behind them that have those same aims, interests, and profit-minded ambitions a lot of the time if it’s a small business website. People with WordPress sites for their persona ventures may have less to gain from standing out, but it’s still something they’re going to want to for themselves. There can be a surprisingly extensive level of work involved for those folks too, and this leads to looking at the best managed WordPress hosting in Canada for workflow automation. We’ve got that for you here at 4GoodHosting.
The straightest line to standing out with a website is actually less based on visual appeal, and more related to good content. More often than not that’s determined by what you post, and with WordPress sites that makes even more sense as they got their start as a content-publishing platform and are still more optimized for that purpose within a standalone website. Creating that high-quality content is going to be entirely up to you, but if you’re knowledgeable about the subject matter it shouldn’t be too challenging. And then from there it becomes all about using custom post type plugins to improve the functionality of your WordPress site as you assemble it.
Being choosy about which ones of those plugins you go with, and how to best utilize them, is what we’ll look at with this week’s blog entry. Another consideration for some of you is going to be PIPEDA compliant hosting, and it is something that is important for anyone with a small-business website where personal information is going to be be collected and / or user for customer service or retention purposes. That’s going to be the case for most WordPress business websites in Canada and with similar interests it may be good to know that we also specialize in providing GeoTrust SSL certificates for small business websites.
Enough about that part of it for now. Considering there are so many of the best WordPress plugins for just about anything you’d like to do with customizing your site it makes sense that we should get into the post type ones that we’ll go over with a focus on how to use them.
Growing into a CMS
WordPress custom post types are powerful features and they’re a part of what has elevated WordPress from a humble blogging tool to a content management system. They give you the flexibility required to create a bespoke website, but for some less-experienced WordPress users they can be a source of confusion. So what we’ll do here is show you exactly how WordPress custom post types work and how you can be better with them as you take advantage of the best managed WordPress hosting in Canada for workflow automation. In addition to a comparison of them you will also learn how to create them, and how to use theme template files to display them in your site.
Let’s start with a solid definition of what we’re talking about. Post types are ways of categorizing different types of content in WordPress as you create and work with posts and pages. But there are other post types too - Attachments, Revisions, Navigation Menus, Changesets and customs CSS. But for most WordPress users and developers the only post types they need to concern themselves with are the first five: posts, pages, attachments, revisions, and navigation menus. And with the rest of the entry we’ll focus on posts exclusively.
They are dynamic content and need to be updated regularly. You can add categories and tags to them so that they’ll be displayed in multiple archive pages, and they’ll also show up on your home page or your blog page as well.
Posts tend to make up the bulk of the content on your site and when a post is in the database it may be a post of any type - pages, attachments, or anything else. When most of us talk about posts, we mean the posts in our blog, which belong to the “post” post type. From there we move to pages - static content that is designed to stick around longer than posts and to provide information on the kinds of things that don’t change so often. Examples can be your contact details or the ‘about us’ page on a business website.
It’s not possible to have categories or tags on pages and they aren’t designed to be displayed on archive pages. For this reason visitors only access them via your navigation menu. An attachment is a media item that’s been uploaded to your site but isn’t the media file itself. It’s more the data relating to it, and each one will have a unique ID and metadata such as its title, description, ALT text, and more along with its own attachment page with a unique URL. You can find the URL for this via the media editing screen for that attachment.
Attachments can be any kind of upload: images, videos, pdf files, and more. They are accessed and edited via the media item in the WordPress admin menu, or you can upload them directly to posts/pages when you’re editing them.
Some common examples of custom post types are:
- Products for an e-commerce site
- Events for a booking site
- Portfolio items or projects for a portfolio site
- Maps for a mapping site
What you need to determine no matter what type of post you’re considering is do I want to display my new content in the main blog page or as a static page, or would it be better to show it on a separate archive page? In some cases, using a category to separate out your new content might be enough: maybe you’re running a blog and want to include case studies that you can display on their own page (using a “Case Study” category that you create) and also show in the main blog. But if you want to keep your new content separate from your blog posts, then it makes sense to create a custom post type for it.
Adding a Custom Post Type with a Plugin
Moving along here we can see this has nothing to do with PIPEDA compliant hosting, but certain post types may be means of collecting personal information from customers or service subscribers. If you’re creating a custom post type you need to know how to add it, and more often than not you’ll be doing so with a plugin. There may be instances that a person codes it in manually, but if you’re a more novice user then why wouldn’t you choose to make it as easy as possible with a plugin?
There are two types of plugins you can use to register a custom post type: the first will register a custom post type in order to add functionality that comes with the plugin, and the second will give you with an interface that can be used for creating your own post type.
The first example includes a variety of plugins including e-commerce plugins, event plugins, and more. And the most popular WordPress plugins, WooCommerce. Let’s start there.
WooCommerce is an example of a plugin that registers a custom post type in order to work and it can be categorized as a ‘product’ post type. WooCommerce also registers some custom taxonomies and custom fields for you to organize your store, including product categories and product tags.
You may also choose to use WP Google Maps to register custom post types. The plugin adds a taxonomy which is unique to events - ‘event category’. It applies normal tags to events as well, so you can use the same tags you use for your blog posts. The ‘map’ post type works differently from the product or event post type in the previous plugin. That’s because you’re not displaying an archive page of all your maps, and instead the plugin will be giving you a shortcode for each map you create. This makes it so that you can embed into a post or page in your site.
The other option is to use a custom post type UI plugin and this is usually what’s needed if you required wider functionality to your post and that’s made possible with a different interface. With a custom post type UI plugin you are set up to register your own custom post types using the admin screens and there’s no need to be writing any code. From there you can add a new post type or edit any existing ones you’ve registered, along with the option to edit the settings for the post type or go with the default settings. You can find full documentation on all of the settings and options for a post type in the WordPress Codex.
Setting up Function for Post Type
The bulk of what’s needed for using custom post type plugins has been covered now, and all that’s left before touching on the best managed WordPress hosting in Canada for workflow automation again is to explain how to set up function for post type. The post you create will have all of the code contained inside it, and of course that’s a part of what’s prebuilt into the plugin. It’s good practice to use a prefix on all of your functions so that you don’t clash with the name of any function provided by your theme and the rest of the code will be added inside the braces of that function.
There will or won’t be a ‘hierarchical’ value to how you use your custom post type. Set it to true and the post type will behave like pages, with a hierarchy possible and parent and child posts of any post of your post type. Change to false and it’ll behave like posts, without a hierarchy.
The ‘supports’ array defines a number of features of post types that you can have this post type support. Many WordPress users like to ensure that features such as featured images and custom fields are turned on.
Once the post type is registered and ready for use on the site it’s good to take a little time to add some posts to it and only ones of your custom post type. So then it’s about how to display them. Maybe you’re using a custom taxonomy to display them, or maybe you’ve added the ‘category’ taxonomy. Either way, you have four options here:
- Displaying the individual post
- Displaying the full post type archive
- Displaying a custom taxonomy archive, using a taxonomy you’ve registered for your custom post type
- Integrating posts from the custom post type into the archive for an existing taxonomy such as ‘category’, or into the main blog page
If your theme has an archive.php file, it will use that. If not, it will use index.php. Single posts created using a custom post type will also be shown using the first relevant template file that’s found in the template hierarchy. Last thing is to keep in mind that your main blog page will only include the ‘post’ post type by default.










