enter image description here

I just would like to get and display the parent (or grand parent if necessary) category name in WordPress.

I have this :

single_cat_title()

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


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: