- This topic is empty.
-
AuthorPosts
-
July 8, 2012 at 5:06 pm #38825
jamest
MemberHi All,
I’m trying to replicate the navigation layout Chris uses here on CSS-Tricks for a project of my own. I’ll use Chris’s site as an example:
css-tricks.com/snippets = Shows all snippets
css-tricks.com/snippets/css = Shows all posts in snippets that are ‘css’
css-tricks.com/almanac/css = Shows all posts in almanac that are ‘css’How is it possible to have different categories (I’m assuming categories) with child categories (or are they tags?) with the same URL slug?
I’ve tried re-creating this type of layout for my site, and it doesn’t allow multiple child categories with the same url slug.
What I’m trying to achieve is an attractive url, with a hierarchical layout, where multiple categories can have the same child categories (different physically, but the same name) – And most importantly, I can have a custom template for each parent/child category.
I did wonder whether I could achieve this using ‘pages’ rather than categories – but before I start working on this I though I’d ask your opinions.
Thanks in Advance!
JamesJuly 8, 2012 at 6:12 pm #105672jamest
MemberI think I may have worked part of it out…
– Custom Taxonomy called Snippets with Terms ‘CSS’, ‘PHP’, ‘WordPress’ etc.
– Use the taxonomy-snippets.php template to show all snippets.
– Use the taxonomy-snippets-css.php template to show all css snippets.BUT – how would I then create a Custom Taxonomy called Almanac that also has Terms ‘CSS’, ‘PHP’ etc?
They’d need to have different slugs which makes the URL look messy :(
Just to say – I’m not creating a CSS-Tricks-2.com – I’m just using Chris’s navigation as an example, as it makes sense in this context!
July 8, 2012 at 6:38 pm #105673jamest
MemberOr.. better still…
– Create 2 Custom Post Types – Snippets and Almanac.
– Create a Taxonomy called ‘about’ with terms ‘CSS’, ‘PHP’ etc and link it to both Snippets and Almanac.I’m presuming that way I can have a snippet with css, and an ‘almanac’ with css.
BUT – how could I then query down to taxonomy level for each of these? i.e. have a different template page for snippets/css and almanac/css?!
ALSO – I’m not sure whether the permalink structure would be pretty…
July 24, 2012 at 7:03 pm #106678clausmunch
MemberSo, what did you end up with? :)
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.