Well I havent found why there’s a category to my homepage but I found the function is_home()
and added it to my if:
if($category[0]->{'name'} !== "Blog" || is_home()){
echo "document.onload = removeWhiteDiv();";
}
if($category[0]->{'name'} === "Blog" && !is_home()){
echo "headerAnimation();";
}