


We’ll be adding more options in the future so you can selectively choose where you want your header, body, or footer code to load. Scroll down and click “Save Changes.” Load header, body, footer code on select posts or pages Code added here will be printed above the closing tag on every page of your website. Scroll down to the “Code” section and enter your code into the “Add Footer Code” box. To add code to your WordPress footer, follow the steps below. Scroll down and click “Save Changes.” Add code to WordPress footer Code added here will be printed below the opening tag on every page of your website. Scroll down to the “Code” section and enter your code into the “Add Body Code” box. Under the “Options” tab, click on the “Assets” sub-navigation menu. To add code to your WordPress body, follow the steps below. Scroll down and click “Save Changes.” Add code to WordPress body Code added here will be printed in the section on every page of your website. Scroll down to the “Code” section and enter your code into the “Add Header Code” box. Perfmatters plugin settings Step 2Ĭlick on the “Assets” tab. Step 1Ĭlick into the Perfmatters plugin settings. To add code to your WordPress header, follow the steps below. Check out this article on how to add PHP to your WordPress site. For adding custom PHP code, we always recommend the Code Snippets plugin. The boxes don’t accept server-side languages, such as PHP. This could include inline CSS inside tags or inline JS inside tags. The following boxes print out code directly on the front end, so it needs to be valid HTML. With the Perfmatters plugin, you can easily drop any custom code into both your header, body, and footer. On our site, we load the following in our header. We always recommend loading your favicon from your CDN, and with most themes, you will need to manually specify this. A good example would be with your favicon. There are times when you might need to add custom code to your WordPress site’s header (head), body, or footer.
