Help with hierarchy (5 posts)

  1. freaksauce
    Posted 3 years ago #

    I have to build a site that has multiple countries/regions like so:


    But they need to share much of the same information:


    So I'm thinking that I create a custom post type Products and then have a custom field checkbox for each country/region if I want it to show.

    Any ideas how this can be achieved?

  2. Luke Rumley
    Posted 3 years ago #

    You are on the right path. I like to use a plugin like "Custom Post Types UI" or "Easy Custom Post Types (paid)" to do CPTs, but you can roll your own in functions.php if you prefer: http://codex.wordpress.org/Post_Types

    You can make a custom taxonomy of region, or just use category and create the regions as categories. Does that help?

  3. Gaurav Raghav
    Posted 3 years ago #

    rather than creating folders create subdomains

  4. freaksauce
    Posted 3 years ago #

    Thanks Luke, yeah I'm just not sure how to keep the urls to products with different countries but still sharing the same product information. So in case I didn't explain properly products can be visible in multiple regions or countries, but they are the exact same products. So I only want to create a single products custom post type.

    Guarav subdomains means multiple installations which isn't really what I want

  5. Luke Rumley
    Posted 3 years ago #

    Yep, I think I understand now, but I wonder if that is the best method. Here is an example from the site I maintain for my day-job: http://store.steelcase.com/brochures/cobi/. You can get to that page via Chairs -> Office & Desk or via Chairs -> Guest & Informal. Both paths lead to the same product URL. In terms of canonical URLs, you only want one product page.

    When WordPress does /%category%/%postname%/ for your permalinks (which I don't think apply to custom post types), it just picks the first category (I think) so you don't end up with a bunch of duplicate product pages from an SEO/SERP perspective.

    So while I am guessing you can somehow hack this to work, I question if that is what you really want to do. :)

Topic Closed

This topic has been closed to new replies.

About this Topic