Site logo

Archived topic

Warning message generated regarding generatepress_child/header.php

7 replies · Started by Suzanne on March 12, 2020

Viewing posts 1–8 of 8

My web site is showing this Warning message at the top of the web site with the url blocked out:
Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /home/*****/public_html/wp/wp-content/themes/generatepress_child/header.php on line 10
>

Here is the coding of child header `<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <main id="main">
*
* @package GeneratePress
*/
?><!DOCTYPE html>
<html <?php// language_attributes(); ?>>
<head>`

I have updated GP Premium, Generatepress theme.

Hi there,

Your child theme folder should not have a header.php file by default.

Have you added that and made some modifications?

That's what I thought. I had someone work on the site years ago to add the Pay Bill page, so they probably added it then. I have the following files in my Generatepress Child folder:
footer, functions, header, index, page, single, simple-php-captcha, page-pay-bills, and style.css.

Header files are different for GP and GP Child. I have no idea how to move ahead.

Your child theme's folder should only consist of 2 files by default: style.css and function.php.

Maybe try backing up your site first and delete the header.php file?

This might be out of our support forum scope as there are some custom solutions involved.

Is there a way to suppress the Warning message?

Thank you.

No problem :)

This archived topic is closed to new replies.