0
votes

I would like to do something with my categories in my wordpress backoffice.

Here is the current situation: I have 5 different categories which have the same subcategories each, and it's really confusing when you see 5 times the same name of the category in the backoffice, and you don't know in which of them to put what whan you save a draft..

Is there any way to have all of them just once, and after selecting a category, and some of the subcategories to have content in the subcategory of the selected category...?

For example:

Americas (category)

  • -News (subcat)
  • -Movies (subcat)
  • -Trendings (subcat)
  • Europe (category)

  • -News (subcat)
  • -Movies (subcat)
  • -Trendings (subcat)
  • Africa (category)

  • -News (subcat)
  • -Movies (subcat)
  • -Trendings (subcat)
  • Asia (category)

  • -News (subcat)
  • -Movies (subcat)
  • -Trendings (subcat)
  • ...and so on..

    The categories are different, but all subcategories are the same.. Is it possible to have these three subcats only once and when select europe and news for example, a post should be placed on a page in Europe->News...?

    Many thanks!

    1
    Wouldn't it be easier to make the countries children of the subcats (in other words, do it the other way around)?rnevius
    Yes, but the same thing would happen again.. Then I would have 5 times Asia, Europe, Americas... in each of these three..Adnan
    Try below code $args = array( 'posts_per_page' => 1, 'post__in' => get_option('sticky_posts'), 'caller_get_posts' => 1, 'category__in' => array('Africa','News')craig
    In fact, despite identical label names, each News (etc.) subcategory will actually be a separate term (see the slug, news-1, news-2, ...). I think you should create a custom taxonomy for the countries, and use a tax query that combines country and category.diggy
    Thanks @diggy . A custom taxonomy worked for me! CheersAdnan

    1 Answers

    0
    votes

    Custom taxonomy has solved my problem, actually that was the option for which I was looking for. Thanks to @diggy for mentioning it.