tutorial header - How to Edit the WordPress Header

How to Edit the WordPress Header

Introduction

Your site’s WordPress header is really important. It is the first thing your visitors will see and more importantly. It is also where we can insert scripts and code to enhance and extend the site’s capabilities and features. Given this, we might find that we need to edit the header of the WordPress site. As we will learn this easy to do.

In this tutorial, we will learn how to edit the WordPress header of a WordPress site.

Let’s start.

Editing the WordPress Header

Editing through the Live Editor

The easiest way to edit the WordPress header is through the admin dashboard. To do this, hover over Appearance item on the admin dashboard then click on Header

Editing Appearance

This will take you to the WordPress Live Editor’s Header editing section. Here you can edit the appearance of your header. Once here, we can choose to modify the appearance of the header.

We can choose to embed a video by uploading an .mp4 file:

embed a video

Or we can choose to embed a YouTube video by providing its link in the appropriate text field.

embed a YoutTube Video

We can also change the header image. To do this click on the “Add new image” button.

Click "Add new image"

Once we do that, we can choose an image to replace the header image.

Replace the header image

Lastly, we can even hide the header image, if needed.

hide the header image

Editing the Headers through a Plugin

The previous method only allows us to change the appearance of the WordPress header. However, we may need to add scripts as well to enhance how the site behaves and what it can do. To do this, we can use the Insert Header and Footer plugin. This plugin can be installed and activated through the admin dashboard.

Install and activate Header and Footers

Once the plugin is installed, we can add the scripts we need through the admin dashboard. To do this, navigate to the Insert Headers and Footers page form the admin dashboard.

go to the plugin settings

Here we can add the scripts we need in the first textbox.

Insert Headers and Footers settings

Editing the header.php file

If you need more control than what the previous methods require, you can always edit the header.php file of your theme. To do this, hover over Appearance then click Theme Editor

go to appearance theme editor

You will be prompted to whether you would like to proceed with editing. There is also an option to create a child theme to make modifications. For our tutorial. we will proceed with editing.

click unterstand

Look for the header.php link on the right sidebar and click on it:

click header.php link

This will redirect us the code of the header.php file. From there we can edit the code and then save it.

Edit and save

Alternatively, you can choose to edit the header.php file and then upload it through FTP if you have access to the remote server. You should place the file the appropriate folder your current theme’s folder or subfolder. In our example, below in the twentyseventeen theme’s folder.

upload through FTP

Conclusion

That’s all for this tutorial, We have learned how to edit the header through, the Live Editor, through a plugin and through, editing the header.php file itself. Now you can edit the header of our WordPress site when you need to.


Comments

Leave a Reply

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