Site logo

Archived topic

Header Logo PHP Error

5 replies · Started by David on May 31, 2022

Viewing posts 1–6 of 6

Hi, I've added and SVG logo to the header via the customizer and also defined dimensions in my CSS using .site-logo img, but when the logo is added, I see these 2 errors printed in the header:

Notice: Undefined index: width in /Users/dh/Sites/www.equitymile.dev.cc/wp-content/themes/generatepress/inc/structure/header.php on line 137
Notice: Undefined index: height in /Users/dh/Sites/www.equitymile.dev.cc/wp-content/themes/generatepress/inc/structure/header.php on line 138

I have set up a child theme but have made no customisations at all as yet so I can rule out any other non-standard code.

Thanks!

Hi David,

Any chance you can link us to the site in question?

And can you try set a width value at customizer > site identity > logo width? This step will adds widthand heightattr to html.

Hi Ying, sorry, at the minute this is only local. I did set a width in the customizer to match the width I declared in the CSS but no luck. I wondered whether SVGs can cause an issue maybe? Thanks

I wondered whether SVGs can cause an issue maybe?

No, it should not.

I need to see the html of the logo, any chance you can right click on the logo > inspect, and take a screenshot of the entire screen?

Thanks!

Hi Ying, looks like this was something to do with my local staging environment. Solved, thanks! : )

Glad you figured it out :)

This archived topic is closed to new replies.