WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Using Duplicate Category Names (6 posts)

  1. tvallier
    Member
    Posted 5 years ago #

    Hi there!

    I'm in the process of migrating an old HTML-only site into WP and got stuck on something I'm hoping someone can help with - I'm trying to create multiple child categories (with different parents) that have the same name.

    For example:

    City
    > Parks
    > Roads
    > Buildings
    Island
    > Parks
    > Roads
    > Buildings

    In this case, I'm trying to set it up so that "City" and "Island" are both categories, and "Parks", "Roads" and "Buildings" are seperate sup-categories under each of the parents.

    Mostly, my concern here is with urls. I'd like to end up with:
    example.com/city/roads/main-st
    example.com/city/parks/jones-park
    example.com/island/parks/west-beach

    where "main-st", "jones-park" and "west-beach" are the slugs of the pages posted.

    Any ideas on how to make this happen?

  2. VelvetBlues.com
    Member
    Posted 5 years ago #

    This can be accomplished using pages. But you can't have two categories with the same 'slug'.

  3. tvallier
    Member
    Posted 5 years ago #

    OK ... so how would I go about setting up the URL structure I'm looking for, then?

  4. VelvetBlues.com
    Member
    Posted 5 years ago #

    Well, if you are just migrating an HTML site and don't necessarily need to have blog posts in each page...

    Then you'd set up your permalink structure like this:
    /%category%/%postname%/

    And then you'd just create the pages.
    So you'd start by creating 'island' and 'city'. And then you'd create the other pages, making sure to set a 'parent' for the pages.

    Then the links will automatically look like:
    example.com/city/roads/page-in-section

    So, you will only be creating pages, not posts.

  5. tvallier
    Member
    Posted 5 years ago #

    Ahh - that works perfectly. Guess I wasn't thinking outside the box enough.

    Thanks!

  6. fas.khan
    Member
    Posted 5 years ago #

    Hi all,

    Just as this problem suggests, I did exactly as this workaround suggests.

    But here is the thing that I want Categories and not the pages.

    For example If I am making the Website of an Architect with Architectures in the Island and it has to be categorized with respect to the Country. The Architect would want to categorize his work with respect to the type as in "Renovation", "New Construction" and "Interior Designing".. In this case, the pages would be something like:-

    Country > City > Island > House > Renovation > Project 1
    Country > City > Island > House > Renovation > Project 2
    Country > City > Island > House > Renovation > Project 3

    -

    Country > City > Island > House > New Construction > Project 1
    Country > City > Island > House > New Construction > Project 2

    - and so for the Interior Designing.

    Now, I dont want to make pages for the Country, City, Island, House or even the three Categories "Renovation", "New Construction" and "Interior Designing".

    I just want to make pages for the Project 1, Project 2 and Project 3 ...

    How am I supposed to do that?

    Even when I am generating the automatic Menus, it is making the link for every Page and then going down.

    Quite Annoying.

    I just want to show the pages for the Project 1, Project 2 and Project 3 but I want the user to come from the Menu which starts from the Country.

    Just Projects should be clickable and openable!

    Many Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic