Right or wrong way to code header.php in WordPress?

[ad_1]

Hi all,

First-time poster. We have recently rebuilt our website (news publisher) and performance and initial response time tripled (in a bad way).

Noticed our header.php files does a lot of PHP work before it gets to meta information, page title, etc.

In comparison, our last build didn’t have this. The header was quite simple and only had your most important HTML, meta tags, etc.

I’ve attached the old and new header screenshots in the off chance someone has an opinion about this.

Thanks,

​

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer