I've created a custom
post_type (destinations) with a category (locations) to provide a tree structure for my SVG map:
Europe/Germany/Berlin/POST Europe/Italiy/Sicily/POST North-Africa/Morocco/Marrakech/POST
My plan was to fill the map by the country short codes like (DE for Germany, IT for Italia, LY for Libya (...).
Here is a basic example of my map: https://jsfiddle.net/wiesson/5p2xhvb8/
How could I assign a new field for my short code of the map that is attached to each location? Germany => DE, Italy => IT, Morocco => MA
I thought, I could use the description field, but I would like the description. Further, the slug could be an option, but for good urls it is also not that good.
I tried https://wordpress.org/plugins/advanced-custom-fields/, but if I query the categories, the new field is not included (obviously).
$categories = get_categories([taxonomy => 'locations']);