Fifteen Logo
blog

Get Accustomed With Custom Post Types For WordPress

December 24, 2015

At Fifteen, we develop a lot of sites using the WordPress platform and one of the features of the world-renowned content management system that we love is its support for custom post types.

Anyone who has created content on a WordPress site will have noticed that by default it offers two types of content – ‘Posts’ and ‘Pages’. Actually, that’s only two-thirds right because files uploaded to the ‘Media’ section are created and stored in roughly the same way as your blog posts, just with extra data attached (you’ll notice that each image you upload has its own page, just like your blog posts). The same applies to your e-commerce products and even your contact form if you are using the relevant plug-ins – everything is stored as a-bit-like-posts-but-not-quite-posts.

These are more technically known as custom post types, introduced to WordPress in 2010’s version 3.0. This was a revolutionary idea that meant plug-in developers no longer needed to put information for things like product pages into new tables in the database, making them more efficient, secure and easier to manage.

Custom post types, and the range of options that can be applied to them, allow for unlimited possibilities when developing a WordPress site.

For instance, if you were running a website about films and you wanted to split your site into different sections for ‘news’ and ‘reviews’, using default options you could create a category for both types of content and even different templates to display it in, but your life would be much simpler if you could manage the two things in separate sections of the WordPress admin area, which is exactly what you do when you employ a custom post type.

Once ‘Reviews’ is defined as its own content type distinct from your posts, pages and so on, you can then enhance the user experience by creating a custom URL structure – filmbuffheaven.com/reviews/2015/the-good-dinosaur, for example – as well as categories specific to your reviews (for grouping them by genre and tagging the leading actors), a browsable star rating system, comments sections and anything else you want to make specific to one particular type of content.

What’s more, if one of your website’s staff has terrible taste in films, you can even revoke their posting access to the ‘Reviews’ post type – they would still be able to add news articles in the ‘Posts’ section, but can’t do anything stupid like telling your readers that Fantastic Four is the year’s best superhero movie in an official review.

customposttypes

Here are some real-world (well, web-world) examples of how custom post types have been used to good effect:

  • Orphans in Need has a custom post type called ‘Orphans’ that allows the charity’s administrators to easily create a profile for each orphan they wish to seek funding for. They can add the child’s name, age, location and a photograph using a bespoke admin interface specific to that content type.
  • The recently launched Grimsby Auditorium website has a special post type for ‘Shows’ that gives each upcoming performance its own page, allowing visitors to share links to their friends as well as automatically feeding into the ‘What’s On’ section. The event pages use a specially designed template to provide all the relevant information, links to the venue’s ticketing system and a handy ‘You may also like’ box.
  • As well as a custom post type for products, clothing retail site HidePark has a ‘Recommendations’ page managed by a post type for customer testimonials. You could manually create this page and just update the text whenever you receive a new comment from your users, but using a custom post type allows the testimonials to be organised into numbered sub-pages and automatically formatted with no hassle.

Custom post types on WordPress can be used to create enhanced content on a website ranging from adding sliders to your homepage to creating a fully functional message board. If you want to build a website but are not sure how your content will fit in, talk to us to find out how we can unlock the unlimited potential of custom post types.

Share

GET MORE

WANT REGULAR BLOG UPDATES TO YOUR INBOX?

Stay on top of your digital game with our blog updates.

Newsletter
More posts

OTHER BLOGS YOU MAY WANT TO READ...