One of the most powerful features of WordPress is the ability to create Custom Post Types (CPTs). One of the questions that often arises when creating a CPT is whether the permalink (URL) slug should be singular or plural.
e.g. Should the CPT slug be
# plural http://ferrarello.com/recipes/guacamole #singular http://ferrarello.com/recipe/guacamole
Yet another option, I’ve seen used is to use the plural on the archive page and singular on the single page, which at first glance does appear to have some appeal.
WordPress CPT Slugs Should Always be Plural
The answer is
WordPress Custom Post Type slugs should always be plural whether the URL is for the single post or archive the page, as they make the URL more useable.
# Archive Page for Recipes http://ferrarello.com/recipes/ // Single recipe http://ferrarello.com/recipes/guacamole
Mixing Singular & Plural Does Not Work
Initially websites were static creations consisting of files and directories. WordPress and other CMSes intercept these requests for files and directories and generate content based on rules and data from the database. If this were a static site you could take a URL like
http://ferrarello.com/recipes/guacamole remove the final element (
/guacamole) and get a new URL higher up in the tree (
http://ferrarello.com/recipes). This establishes a consistent slug (either singular or plural) should be used rather than using one for a single page and a different slug for the archive page.
Jakob Nielsen writes about this idea when he advocates for
URLs that are “hackable” to allow users to move to higher levels of the information architecture by hacking off the end of the URL
Why Plural and Not Singular
It is an established best practice when creating a directory of images to name it (
/images) making a URL like https://example.com/images/funny.jpg a common sight. On the other hand, using a singular slug for an archive page, e.g. https://example.com/image, is illogical and against common best practice.
Consistent Plural CPT Slug
This leaves us with a consistent plural Custom Post Type slug as the best choice when constructing a WordPress CPT permalink.
There are exceptions when you can get away with using a singular CPT slug. Specifically, if your CPT does not include an archive page it would be acceptable to use a singular slug, however,
- I would recommend you include an archive page whenever possible
- even in the case where you do not have an archive page, I do not see any harm in using the plural form of the CPT slug
Other Custom Post Type Information
If you’re interested in some other thoughts on creating WordPress Custom Post Types, see my post WordPress CPT Best Practices.