1. Home
  2. Docs
  3. Tutorials
  4. How to make hierarchical post types & taxonomies permalinks flat (non-hierarchical)?

How to make hierarchical post types & taxonomies permalinks flat (non-hierarchical)?

Wordpress allows to use both hierarchical and non-hierarchical (post-like) post types and taxonomies. In some particular cases it is wiser to keep the content types hierarchical (eg. for easier admin management) and make the URLs shorter (by removing the parents’ slugs from child permalinks) for better SEO performance.

Sample hierarchical permalinkSample flat (non-hierarchical) permalink
Cars
(hierarchical post type)
http://example.com/ford/ford-fiestahttp://example.com/ford-fiesta
Brands
(hierarchical post type)
http://example.com/american-cars/fordhttp://example.com/ford

How to make hierarchical post types & taxonomies permalinks flat? It is pretty easy with Permalink Manager. All you need to to do is to edit Permastructure settings for selected post types & taxonomies and use a specific permastructure tag:

  • %postname_flat% for pages and hierarchical post types
  • %term_flat% for categories and hierarchical taxonomies
“Cars” posts permalinks will always be flat (non-hierarchical) and they will not inherit the slugs assigned to their parents.

The new permastructures will be automatically applied to the new posts & terms. To reset the old permalinks please go to “Tools -> Permalink Manger -> Tools -> Regenerate/reset” page (see more detailed instructions here) or adjust them individually (using “Restore to Default URI” button inside Edit URI box on “Edit Post/Page/CPT” admin page).

Was this article helpful to you? Yes No

How can we help?

Wait!!! Before you go...

Still not convinced? Use following discount code during Gumroad checkout and get 10% off!

BLOG

If you have any questions or need further information, please feel free to contact me via email: