When is it a good idea to build a permalink structure from scratch?

Is it a good idea to design a permalink structure from scratch?

The requirements to the structure are as follows:

  • Pages to be referenced by their structure
    (example.com/grandparent-slug/parent-slug/child-slug).
  • Posts to be referenced by category and date
    (example.com/category-slug/2013/07/my-post-slug).
  • Archives only
    available by category (example.com/category-slug), by category and
    year (example.com/category-slug/2013) by category, year and month
    (example.com/category-slug/2013/07) and by tag
    (example.com/tags/tag-slug).
  • All other links, like comments, feeds, trackbacks, pagination, archive by author and day, attachments are to be disabled.

Is it a better idea to create a new structure following these requirements or to modify an existing structure?
In case of a new structure, how does one go about the permalink setting in WP admin? They are site-specific, and the theme needs to override them.

2 Answers
2

It’s a good idea when you don’t want to use the default structure 🙂

There are a lot (like really a lot..) of cases when site planning includes URL structure, it’s best to really have a grasp of this plan before you begin.

I would go as far as graphing out a representation of the relationships/slugs, that way you can compare it with the “default” structure to figure out if you can make an easy hack (hierarchy/hook) or you need something from scratch.

The http://codex.wordpress.org/Class_Reference/WP_Rewrite API is comprehesive and daunting at the same time.

I really recommend using CPT’s http://codex.wordpress.org/Function_Reference/register_post_type to create the custom structure instead of bending over the defualt posts/pages. It will make your life easier.

Leave a Comment