SKR Tips logo SKR TipsWebsite tips that actually work
WordPress

A WordPress Custom Post Type for Your Game Guides

Our wiki ran for six years with every guide filed as an ordinary blog post. By the end we had 412 of them sitting in the same feed as patch news, server downtime notices and two birthday posts.

A WordPress admin sidebar showing a separate Guides menu beside a list of game guide drafts

Our wiki ran for six years with every guide filed as an ordinary blog post. By the end we had 412 of them sitting in the same feed as patch news, server downtime notices and two birthday posts. Readers subscribed for patch news and got a rewritten boss guide in their inbox. The front page showed whatever had been edited most recently, which meant a typo fix on a two year old guide pushed the actual news off the top.

We fixed it by moving the guides into their own post type, and it took one afternoon plus a week of watching the server logs for 404s. What I did not expect was how much of the benefit came from the editing side rather than the reader side. The thing worth understanding first is that a custom post type is a filing cabinet, not a feature, and most of what people hope it will do belongs to taxonomies and templates instead.

What a custom post type actually changes

A post type is WordPress's way of saying that two kinds of content are not the same thing. Pages and posts are both post types already. Registering a third one gives you a separate admin menu, a separate list table, a separate set of supported fields, and a separate query that you can call without filtering anything out.

Three concrete consequences follow. Your main blog loop stops containing guides, so the RSS feed and the home page carry news only. Your editors get a Guides menu with its own columns and its own draft list, which on a volunteer team cut our accidental publishes to zero. And your templates can diverge, so a guide page can carry a version banner and a table of contents while a news post stays plain.

What it does not do is organise the guides. That is a taxonomy job, and the two get confused constantly. A post type answers the question of what kind of thing this is. A taxonomy answers which game, which patch, which class. If you are grouping guides by the build they apply to, the approach in a custom taxonomy for game patch versions is the piece you want alongside this one, not instead of it.

The arguments worth thinking about

You register a post type with register_post_type on the init hook, in a small plugin rather than in your theme. Putting it in the theme means your guides vanish from the admin the day somebody switches theme, which is a support ticket I have answered more than once.

Four arguments carry nearly all the weight. public set to true is what makes the type visible on the front end and in search. has_archive set to true gives you a listing page at the type's slug, and leaving it false is the usual reason people complain that their archive is a 404. rewrite controls the URL, and passing array('slug' => 'guides') gives you addresses under a guides path. show_in_rest set to true is what lets the block editor handle the type at all, so skipping it lands you in the old editor with no explanation.

Then there is supports, which is an allow list rather than a deny list. Leave it out and you get a title and an editor and nothing else, which surprises people when their featured images disappear. For guides I pass title, editor, thumbnail, excerpt, revisions, author and custom-fields. Dropping comments from that list on guide pages, while keeping them on news, removed about four hundred spam comments a month from our moderation queue without any plugin involved.

One trap sits in the menu_position and menu_icon pair. They are cosmetic, and they are also the two arguments people spend the longest on. Set the icon to a dashicon name, pick a position in the twenties so the menu lands under Posts, and move on.

Why most small fan sites should not bother

The honest advice for a site with thirty guides is to use a category and stop. I have watched three clan sites register a post type, discover their theme has no template for it, get a bare unstyled archive, and spend a weekend fighting template hierarchy to reach the layout their blog already had. The threshold where the trade turns favourable is somewhere around a hundred pieces of evergreen content, or any point where two different kinds of thing are genuinely fighting over the same feed.

There is a second cost nobody mentions in the tutorials. A custom post type is invisible to a surprising amount of the plugin ecosystem until you tell each plugin about it. Related posts plugins, sitemap generators, search plugins, breadcrumb plugins and comment tools all default to posts and pages. After our move I spent longer ticking Guides in eleven plugin settings screens than I did writing the registration code. Default WordPress search did pick the type up automatically, though it still buried the guides under news until we applied the fixes in improving WordPress search on a big guide site.

Where I will defend the work completely is on a site with more than one editor. The separate admin list is worth real money in avoided mistakes. Our patch notes editor never sees 400 guide drafts, and the guide writers never accidentally publish into the news feed at two in the morning before a raid.

This is the order we used on 412 posts. It is slow on purpose, because the step people rush is the one that costs rankings.

  1. Register the type and set the rewrite slug first, then visit Settings and Permalinks once. Skipping that flush is why a brand new type returns 404 on every single URL.
  2. Export a list of the current URLs for every post you plan to move, with the publish date and the title. A CSV from the admin or a database query both work, and you will need it twice.
  3. Move three posts by hand, not with a bulk tool. Confirm the new URL loads, the featured image survives and the author still shows before you trust anything with the other 409.
  4. Bulk change the post type with a database update or a dedicated converter plugin, then reflush permalinks and check your export list against the live site.
  5. Add 301 redirects from every old URL to its new one. If your slugs are unchanged and only the prefix moved, a single rule covering the prefix handles the lot.
  6. Resubmit the sitemap and watch Search Console for a fortnight. We saw crawl errors peak on day four and settle to zero by day twelve.

The one thing I would do differently is keeping the old prefix. We changed the URL structure and the post type in the same move, which doubled the redirect work and made it harder to tell which change caused a traffic dip in week two. Change the type first, live with the old URLs for a month, then change the structure if you still want to.

FAQ

Do I need a plugin to register a post type?

No, twenty lines in a small site specific plugin is enough. Interface plugins are fine for exploring the arguments, but export the generated code and keep it in a file you control, because a deactivated interface plugin takes your post type with it.

Will my existing categories work on the new type?

Only if you say so. Pass a taxonomies argument including category, or call register_taxonomy_for_object_type after registration. Many sites take this chance to build a guide specific taxonomy instead and leave categories on news.

Can two post types share one archive page?

Not through the built in archive, but a page template running its own query with both types in the post_type argument does it in a few lines. That is also how you build a combined site wide latest list after splitting the feeds.

What happens to guides if I disable the plugin?

The content stays in the database untouched, but it stops appearing on the front end and in the admin until the type is registered again. Nothing is lost, which makes a rollback cheap if the move goes badly.

MO
Matthias Okeke

Matthias ran a clan website and a fan wiki for years before writing about them. He covers the sites gaming communities build, from guides to patch note pages.

More posts by Matthias

More in WordPress

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels newwebstechs1 nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot spotlesshaven strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto ankertoto