I just would like to get and display the parent (or grand parent if necessary) category name in WordPress.
I have this :
But it display the actual category name.
My code is in header.php
In this image, in the green part it must be written “Energies Renouvelables”
Have an idea ?
Read more here: Always get parent category name WordPress