Naturale URL Progettazione e pagina statica
-
16-10-2019 - |
Domanda
Una pagina statica e altre pagine che sono figli di essa vengono utilizzati su un blog. Per fare un esempio:
www.example.com
La lumaca per quella pagina si presenta nel permalink per le pagine secondarie come www.example.com/long-slug-from-static-front-page/sub-page-slug.html.
La questione ora è come rendere il design URL più naturale? Dal momento che la pagina padre è prima pagina, è lumaca dovrebbe essere la home page siti-URL (ad esempio, nessuno come in http: // www. example.com/ ), ma le pagine statiche slug è aggiunti al posto.
I odore che si tratta di una lacuna in WordPress, tutte le idee?
mi è stato chiesto di rendere lo scenario più concreto da un'illustrazione perché è stato abbastanza fastidioso describben. Scusate. Obiettivo è quello di utilizzare WordPress come un CMS per riflettere la struttura seguente (si prega di non il modo altro turno):
Illustrazione:
logico dei dati e la sua struttura:
- Avvia
- Blue
- Red
- rosso scuro
- Red Light
- bruciato rosso
- giallo
Mappatura dei dati alle pagine:
- Avvia: Home-Page
- Blu: Blu-pagina
- Rosso: Red-Pagina
- rosso scuro: rosso scuro-pagina
- Red Light: Red Light-pagina
- bruciato Rosso: Burned Red-pagina
- Giallo: Giallo-pagina
URL Disposizione:
- Home-Page: http://example.com/
- Blu-pagina: http://example.com/blue/
- Red-pagina: http://example.com/red/
- Dark Red-Pagina: http://example.com/red/dark/
- Red Light-Pagina: http://example.com/red/light/
- Burned Red-Pagina: http://example.com/red/burned/
- Giallo-pagina: http://example.com/yellow/
Is WordPress lo strumento per il lavoro? O lo fa utilizzando gerarchia delle pagine e statico di prima pagina contraddice il layout di URL?
Soluzione
WordPress does have a way of doing what you want. Make them all top level pages. Unless you have a good reason not to.
Altri suggerimenti
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.