Home › Forums › Support › Getting a PHP error for theme This topic has 7 replies, 2 voices, and was last updated 5 years, 11 months ago by Leo. Viewing 8 posts - 1 through 8 (of 8 total) Author Posts April 28, 2020 at 5:43 pm #1260439 NIck I am getting this in my theme Warning Use of undefined constant HTTP_USER_AGENT – assumed ‘HTTP_USER_AGENT’ (this will throw an Error in a future version of PHP) 1 + wp-content/themes/generatepress_child/header.php:1 Core April 28, 2020 at 5:47 pm #1260440 LeoStaff Customer Support Hi there, The error is pointing to the header.php file in the child theme folder which shouldn’t be there by default. Did you actually need to modify that file? April 28, 2020 at 5:48 pm #1260441 NIck Hello, What would I be modifying? April 28, 2020 at 5:53 pm #1260448 LeoStaff Customer Support You don’t need the header.php file in your child theme folder at all if you aren’t modifying it April 28, 2020 at 5:54 pm #1260449 NIck Ok, I am not getting this error on my local site April 28, 2020 at 5:56 pm #1260451 LeoStaff Customer Support By default, the child theme folder should only consists two files: function.php and style.css. Anything else in there is extra unless you are modifying them. You can download a fresh child theme if you’d like: https://docs.generatepress.com/article/using-child-theme/#installing-a-child-theme April 28, 2020 at 6:28 pm #1260477 NIck OK, reason I have this is for extra header code… I found BOT code which I have deleted and fixed the error. Not sure how as I use word fence. April 28, 2020 at 8:17 pm #1260523 LeoStaff Customer Support Not sure what’s the code you are adding but you could also consider using the wp_head hook with a hook element: https://docs.generatepress.com/article/hooks-element-overview/ Author Posts Viewing 8 posts - 1 through 8 (of 8 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In