1

We are working in a new website and having issues with duplicate categories slugs from "posts" and "pages". We are trying to develop the same structure of this website: https://coconuts.co.

We started with the News category:

  • home/city1/news/politics
  • home/city2/news/politics

1) We tried with nested categories without success. The problem is that when we create the child category "news" for the second city, Wordpress set automatically the slug to "news-2". This seems to be the Wordpress behavior by default.

2) Then we tried with Custom Posts Types. After installing the Pods plugin, we created "City1" and "City2" custom posts types with "city1" and "city2" as their slugs. Then we created for them their own category "news" and its child category "politics".

When we visit City1 and News pages everything works fine. We can see the web page and the custom posts inserted in them. But when we navigate to the third level "Politics" page, wordpress can't found it.

There is a chance that Coconuts use a Multisite wordpress installation, but we would like to obtain the same structure in a single wordpress installation.

Any help will be appreciated.

Kind regards.

  • If you look at the body classes for each of the category pages on Coconuts, it will reveal the actual category slugs for each, which are all unique. They are possibly using some sort of rewriting to achieve their URL structure. – Milo Oct 19 '18 at 4:19
  • Thanks @Milo for your quick replay. Finally I manage the issue working with Pods Framework. I set the permalink to /%postname%/. Then create a Pod for every category and in the Advanced tab set Functionality to Page instead of Post. You also need to mark hierarchy in the same tab. – Peter C. Oct 19 '18 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.