Question

A static front page and other pages which are children of it are used on a blog. To give an example:

www.example.com

The slug for that page shows up in the permalink for sub pages like www.example.com/long-slug-from-static-front-page/sub-page-slug.html.

The question now is how to make the URL Design more natural? Since the parent page is the frontpage, it's slug should be the sites homepage-URL (e.g. none as in http://www.example.com/) but the static pages slug is added instead.

I smell that this is a shortcoming in WordPress, any ideas?

I was asked to make the scenario more concrete by an Illustration because it was quite akward describben. Sorry. Aim is to use WordPress as a CMS to reflect the following structure (please not the other way round):

Illustration:

Logical Data and it's Structure:

  • Start
    • Blue
    • Red
      • Dark Red
      • Light Red
      • Burned Red
    • Yellow

Mapping of Data to Pages:

  • Start: Home-Page
    • Blue: Blue-Page
    • Red: Red-Page
      • Dark Red: Dark Red-Page
      • Light Red: Light Red-Page
      • Burned Red: Burned Red-Page
    • Yellow: Yellow-Page

URL Layout:

Is WordPress the tool for the job? Or does using page hierarchy and static front-page contradicts the URL layout?

Was it helpful?

Solution

WordPress does have a way of doing what you want. Make them all top level pages. Unless you have a good reason not to.

OTHER TIPS

Not exactly, WordPress determines it's query from the URL structure, so:

www.example.com/my-sub-page/ would be the exact same structure as www.example.com/my-other-top-level-page, so WordPress would have no way to tell if you are looking for a subpage or a top level page.

Having said that, I don't think WordPress lets you have the same slug for a sub level page and a top level page - so there shouldn't be a reason. If you require that permalink structure, why not just have your "sub pages" as top level pages. If you want them to be at www.example.com/my-sub-page/ then it sounds like they are pretty 'top level' anyway.

Your sub-pages should NOT be children of the 'homepage'. I know people draw sitemaps like that but it's really not how it works.

So you have:

Example.com (using static front page 'home') Example.com/about (a top level page, NOT a child of 'home')

There are no SEO or User experience problems from this approach, it is how most CMS sites are done.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top