How To Edit The WordPress Header | WP Learning Lab

How To Edit The WordPress Header | WP Learning Lab


Grab Your Free 17-Point WordPress Pre-Launch PDF Checklist:

How To Edit The WordPress Header | WP Learning Lab

The WordPress header is one of those place where a lot of important things happen. Scripts are called, integrations are set up and validated, stylesheets are imported, and so on.

Usually, leaving the header.php file alone is the best plan, but sometimes you have to make additions or changes.

Before you do, keep in mind that if you are editing the header.php file of the main theme, then updates to that theme can cause your changes to be overwritten.

To avoid this, you’ll need to create a child theme. Here’s a tutorial to help you do just that:

Once you’ve created the child theme you’ll want to duplicate the header.php file into it by following this tutorial:

Once you have the header.php file there we can get to work.

If you’ve followed the tutorials above you can now dive into header file and started editing.

If you didn’t create a child theme, then there are a couple ways to find and edit the header.php file.

First, when in your WordPress dashboard you can click on the Appearance menu and then Editor. On the right side of the page you will the list of files in the theme. One of them will be called header.php. Click on that file and it open it so you can edit the WordPress header.

Or you can go through the file manager in your cPanel account. Once in the file manager navigate to wp-content/themes/YOURTHEME. The header.php file is normally in the root of a themes directory.

You can also connect via FTP to make edits to files.

Now that you’ve found the header.php it goes without saying that you need to be careful. One wrong move in a PHP file and your whole site will go down until you fix the problem.

So only edit the WordPress header if you are comfortable with PHP.

I hope this information helps you! If you have any questions leave a comment below or ping me @WPLearningLab on Twitter.

————–

If you want more excellent WordPress information check out our website where we post WordPress tutorials daily.

Connect with us:

WP Learning Lab Channel:

Facebook:

Twitter:

Google Plus:

Pinterest:

17 Comments

17 Replies to “How To Edit The WordPress Header | WP Learning Lab”

  1. I found a video which helped me with a meta slider since I wanted to make a slideshow in my header in West Theme. When I tried to put the code in the theme header the slideshow appeared below the header. Do you know how to make it right? Not to technical since I am a wordpress retard.

  2. Hi how you doing? Great tutorial!! I want to put a header above my header. Just social icons in there and maybe a subscribe button. A friend created code for me but I don’t think he knows wordpress. Once i put the code in my child theme my website gives internal service error but once I put it in dreamweaver it shows perfect. You think you can help me with this

  3. Hi! i am looking to make my header thinner (still want it to be long), how do i change the height? Thanks for your help!

  4. Hi, when I try to do this on wordpress.com I get a completely different UI. Do you know why?

  5. Hi dear I hope you are well. Sir im using asrid them free version any idea how to customize it??

  6. Hi there! Can you explain how to add a line of text within the header? I’m needing to add a phone number next to my clients logo (their request) and I’m not sure how to do that. I’m proficient in html and css so I can style it. The template I’m using doesn’t have that feature built in. I’m familiar with php on a student level. I can read it but I can’t yet write it. Here is my url for the site I’m working on. cannapack.completedigitalagency.com. Thank you! Cheryl

  7. hello, i want to know something please, i use my website theme in wordpress one year. know i want to change restyle this theme with coding my own so what should i do?

  8. hi, very new to this. I am trying to verify my website through google search console. I need to paste a code to my homepage, but I don’t know where to access the part of my website’s homepage where I can paste it.

  9. OR… you can copy and paste the original code into notepad or any other word processor and save it as a backup.

  10. *SIR I CANT NOT FIND MY THEME EDITOR IN APPEARANCE SECTION..WHAT TO DO…AM ALREADY GONE FTP FILE MANAGER THERE I DONE ALL PERMISSION BUT STILL NOT SHOWING MY EDITOR OPTION IN THEME APPEARANCE SECTION?*

Comments are closed.