- Log in to your WordPress site.
- Go to Plugins > Add new.
- Search for “”Header and Footer Scripts””.
- Click “”Install Now”” and activate the plugin.
How do I add code to WordPress page?
Method 1.On the post edit screen, add a new code block to your post. You can now enter the code snippet in the text area of the block. After that, you can save your blog post and preview it to see the code block in action. Depending on your WordPress theme, the code block may look different on your website.