Creating SEO Friendly Permalinks For Custom Post Types

Caldera URL Builder UI

One important part of search engine optimization (SEO) is creating the right permalink structure. While best practices in SEO are constantly shifting, the recommendation for WordPress permalinks has stayed the same for a long time. This is probably because the classic example.com/category/post-slug structure makes a lot of send for end-users. It creates a URL structure that matches how a site is navigated, and it makes the relationship between the post and the category obvious.

For posts, creating this structure is fairly easy in WordPress, using the permalink settings:
Creating WordPress Permalinks The Old Fashion Way

 

Creating SEO Friendly Permalinks For Custom Post Types

For custom post types, that are associated with a taxonomy, be it categories or a custom taxonomy, creating a similar structure can be tricky. For a site built around custom post types, such as membership sites, educational sites, and eCommerce sites, it’s vitally important. Caldera URL Builder lets you edit your permalink structures, for each post type individually and visually.

For example, if you have a custom post type called “course” and an associated post type called “course-level” and a course called “css” that was in the “basic” course-level, then you would want its URL to be example.com/basic/css.

With Caldera URL Builder we can create this in a few seconds. From the Caldera URL Builder page, which is in the settings menu, click the “Add Rule” button and select the “course” permalink. Then for the the first segment, choose “Static String” and enter “courses”.

 

View post on imgur.com

Next you can click the plus button to add an additional segment. For this segment choose “Taxonomy.” This will let you use any taxonomy associated with this post type in your URL. Choose the “Course Level” taxonomy and then set one of the terms in it as a default to use.

View post on imgur.com

Adding A Second Post Type

Caldera URL Builder lets you add rewrite rules for as many post types as you want. Want to set the example.com/category/post-slug URL structure we discussed above for posts? Just click the “Add Rule” button one more time. Then add one segment and select “Taxonomy” and “Categories.”

Want to use anything besides “uncategorized” for the default? That’s easy too. Just select another taxonomy from the “Default” dropdown.

View post on imgur.com