The roots_ body_class function ia a great feature, but it only adds the current page slug. How would it be possible to change the code, so that it also shows it’s top parent (or all parents if easier) slugs?
$classes[] = basename(get_permalink());
The reason for this is, that i will have different colours for each page/category and i think this is the easiest way to do it. I tried my luck but i’m still picking up php so it’s a bit over my head for now.
Thanks