Never mind I found the solution. It was actually simple I just copied the 404.php file to my child-theme and edited it 😉
I didn’t know of this hook but I tried and It worked great thank you ! That’s exactly what I wanted 🙂 And I didn’t even need to set a priority.
Hi thank you for your response. I tried the three hooks that you mentioned and generate_before_logo seems to be the right one for me. It does work but for it to work I had to activate the logo which the person I am managing the website for doesn’t have. Right now I have a random image to which I added display: none;. Is there a better way to make it so that the generate_before_logo hook works without activating the logo ?