• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Make WP Simple

WordPress Tutorials

  • Blog
  • Getting Started
  • Tutorials

How to Add Code to Your Site Header on a Specific Page in WordPress

January 25, 2018 Tutorials 19 Comments

This post may contain affiliate links, which means I will receive compensation if you click through and make a purchase.

How to Add Code to Your Site Header on a Specific Page in WordPress

You’ve just been given a code to add to the header of a specific page in WordPress. Now what? Before you stress yourself out wondering how you’re going to be able to add the code, take a deep breath. It’s actually a lot easier than you think. I’ve got the step-by-step instructions on how to add code to your site header on a specific page.

Watch the video tutorial or keep reading to find out more.

How to add code to your site header on a specific page

1. Install and activate the Header and Footer Scripts plugin

2. Edit the page or post that you want to add the code to.

3. In the insert script to head box, copy and paste your code.

4. Save your page/post.

The code has now been successfully added!

To add code to the header or footer of your site on a sitewide basis, you can use the same plugin. Just to to Settings > Header and Footer Scripts and paste your code into the appropriate box. This will add the code to every page on your site.

For an alternate method to add code to the header or footer sitewide, visit How to Insert Code into the Head Section of Your WordPress Blog.

Tweet
Pin34
Share1
35 Shares

Reader Interactions

Comments

  1. Ida Pahus says

    March 16, 2018 at 6:41 am

    What happens when you want to add mutiple codes? Do you just post it in another line in the header scripts?

    http://livelifefullyalive.com/

    Reply
    • Allyssa Barnes says

      April 9, 2018 at 10:13 am

      Yes, add another line! 🙂

      Reply
  2. Josiah says

    September 24, 2018 at 3:01 pm

    Thanks for the info!
    If I add header info to a page, will it stay there if I delete this plugin later?

    Reply
  3. Claudio Cruz says

    March 12, 2019 at 7:23 pm

    Thank you. You helped me solve an entire day’s research difficulty.

    Reply
  4. Rohit says

    March 20, 2019 at 8:57 am

    Hey, thanks so much for this. I have a question – if I have two scripts /codes to be added on the website, but one code is for the whole site of 10 pages, except for one page. And the second code is for one page only (out of the 10 pages). So do I need to add the first code to every page of the site, i.e., 9 pages? Or is there a way to just add the code once for the 9 pages? And then I can add the second code on the 10th page too.

    Reply
  5. KS says

    March 31, 2019 at 2:04 am

    THANK YOU SO MUCH!!!

    Reply
  6. Dave w says

    April 11, 2019 at 7:05 am

    thank you, most of this stuff is easy wants you know how. Thanks again

    Reply
  7. Lisa Pecunia says

    May 26, 2019 at 11:06 am

    This plug in is no longer maintained. Is there another one you recommend?

    Reply
  8. Olagunju Nasir says

    May 31, 2019 at 6:50 am

    Nice post but unfortunately, the plugin is no longer maintained.

    Also, is there a plugin that allows me to place code in the header of all my blog posts excluding pages?

    Thanks.

    Reply
  9. isaac_Techno says

    June 5, 2019 at 5:06 am

    Great article here , Good article.
    Great article, just what I needed.
    Hello to all, the contents existing at this site are in fact awesome for people experience, well, keep up the good work fellows.

    Reply
  10. Matej Ištván says

    June 5, 2019 at 6:11 am

    Mannyyyyy thanks you great, i love you

    Reply
  11. Elke says

    July 16, 2019 at 2:57 pm

    Thank you so much, that was exactly what I was looking for 🙂

    Reply
  12. djamila_st says

    September 4, 2019 at 9:55 am

    Like i said my heart has always been clean n true for you i cant even think how life is gona be with out you n how im gona live it with out you by my side

    Reply
  13. djamila_st says

    September 5, 2019 at 9:56 am

    I love the idea of a poll! I know that all these ideas work well because you taught them to me and I have found a way to survive in the organic reach game!

    Reply
  14. djamila_st says

    September 8, 2019 at 2:18 pm

    Thanks for the great reminders, Kim. I’m not finding that poll page

    Reply
  15. Mireia Leon says

    October 8, 2019 at 11:03 am

    It was really helpful. Thanks!

    Reply
  16. Jeremy says

    May 7, 2020 at 7:14 pm

    Hi,

    I followed the steps and it does work but now the snippet is showing where the header is. How can I hide the snippet so visitors can’t see it?

    Thank you.

    Reply
  17. Marie Nugent says

    May 11, 2020 at 6:25 pm

    Thank you sooooooo very much! You’ve saved the day 🙂

    Reply
  18. Taimoor Siddiqui says

    September 19, 2020 at 12:26 pm

    Thanks! its very helpful topic.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

How to Add Code to Your Site Header on a Specific Page in WordPress

Looking for Something?

This site is powered by:

Footer

  • Getting Started
  • Tutorials
  • Tools & Resources
  • Website Strategy
  • All Tips & Tutorials
  • About
  • Subscribe
  • Get Help
  • Contact

© 2021 Italicized Creative LLC. Privacy Policy. Terms of Use.