In this quick tip you’ll learn how to edit the header in WordPress. It’s easier than you might think, so let’s get started!
Edit the Header in WordPress
Here’s a complete video version of this WordPress quick tip. Don’t forget to subscribe to our Envato Tuts+ YouTube channel for tutorials, free courses, and more!
On the “front end” of your WordPress website the “header” is the upper part of the page:
The header will usually contain your website’s logo, some navigation, perhaps a search box, and maybe some additional links.
It appears (under normal circumstances) in exactly the same way across all the pages of your website, and its contents sit in a file called “header.php”; one of the files in your active theme folder.
Note: bear in mind that the contents of header.php will be different for every theme.
How to Edit the header.php File in a Code Editor
To find the file and edit it yourself go to wp-content > themes > your-theme-name > header.php.
You can then open it in a code editor and make any changes you need to. But bear in mind that editing any of your theme’s php files could cause things to break!
How to Edit the header.php File Via WordPress Admin
To edit this same file via the WordPress admin, go to Admin > Appearance > Theme Editor to find the file.
In the right hand sidebar make sure you select the currently active theme:
header.php will then be labeled Theme Header to help find it easily.
Make the changes you need, and hit Update File. WordPress will run a quick PHP check to make sure your code changes don’t cause any problems, but it’s always worth cautioning against making direct changes without sufficient backups.
That’s How to Edit the Header in WordPress
Editing the header file in WordPress can be a really useful thing to know how to do, and it’s a great first step towards properly developing your WordPress theme!
Learn More About Using WordPress
If you’re relatively new to WordPress, why not try some of our other beginner’s tutorials and tips:
- WordPressHow to Edit the Home Page in WordPressAdi Purdila
- WordPressWhat Are Tags in WordPress?Adi Purdila
- WordPressHow to Edit the Footer in WordPressAdi Purdila
- WordPressWhy Use WordPress?Adi Purdila
- WordPressHow to Launch a WordPress SiteAdi Purdila
WordPress Theme Inspiration
We have a tonne of WordPress theme roundups for you on Tuts+; take a look at these to see if any will work for your next project!
- WordPress Themes20+ Best WordPress Themes for Writers and Authors (2020)Brenda Barron
- WordPress Themes20 Best Learning Management System (LMS) WordPress Themes (Free & Premium)Eric Karkovack
- WordPress Themes20+ Creative WordPress Photo Gallery Themes for Simple Portfolio Sites 2020Hermione Wright
- WordPress Themes25 Best WordPress Themes for Graphic DesignersBrenda Barron
- WooCommerce10+ Best WooCommerce Technology Themes for Computers and ElectronicsAladin Bensassi
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post