How to edit Header in WordPress

On Spotlight: How to edit Header in WordPress in 3 Easy steps.
A site header is one of the most important part of your blog, as the name suggest, header sits at the top of every page of your blog, and should be easily be customized in order to use it smartly.

In WordPress, and in any other site building platform the header will usually contain a logo, menus to access different parts of the website, a search bar, contact information and Privacy Policy.

In eCommerce stores, it’s also common to see the cart and the products you’ve added to it.

Here will look at step by step on how to edit header part of your blog.
There are several ways to edit the header in WordPress. Here, we have outlined 3 easy ways that you can follow:

  • Using a plugin
  • Editing the theme’s header.php file
  • With an FTP client

Let’s have a closer look at each of them.

1. Header editing using a plugin
Make use of a free wordpress plugin namely “Insert Headers and Footers“ this is a simple tool and does not need any configuration

Login to your WordPress dashboard-> Go to Plugins > Add New. From there, you can install new WordPress plugins by searching the repository or by uploading the plugin files. In the search bar, type Insert Headers and Footers.
Select the correct option and install it. Then, activate it.

You are now ready to configure it. Under the Settings section, you’ll see the Insert Headers and Footers Settings.

Here, you’ll see that you can edit three sections:

– Header
– Body
– Footer

2. Edit header by using Header.php file
If you want to have more control over your header and have some basic coding skills, there are other options. If you’re not a fan of using too many plugins to avoid slowing down your website or you simply don’t want to use the Insert Headers and Footers plugin, don’t worry. Here we’ll show you how you can still edit your WordPress header with a bit of coding step-by-step.

To do this, you’ll need to modify the theme’s core files. So, before you start, we recommend you create a child theme. You can create one manually or using a child theme plugin.

Once you’ve created the child theme, let’s see how you can modify the header file using the WordPress admin dashboard.

First, log in to the admin section->Under the Appearance section, you’ll see the Theme Editor.
Here you can make changes to the theme’s core files. By default, the editor will pull the current theme’s style.css file to edit and it’ll look something like this.

On the right side, you will see all the files and folders available in your current theme’s directory.
Scroll down the list until you find the header.php (under the Theme Header)

Select the file, and it will open in your editor. To create this guide, we’re using the Generate Press WordPress theme.

Now, the fun begins. While editing the header.php file and adding your custom code, make sure that you add the snippet between theandtags. In this case, we are going to add a sample text right before the tag

3. Edit Header Via FTP
This is also an easy way for beginners. If you have issues with the WordPress theme editor, you could use an FTP client. For this tutorial, we are using FileZilla because it’s our favorite but if you like a different one, any will do. Now, let’s see how to edit the WordPress header via FTP.

To connect FTP to your server, you need an FTP account. From the hosting cPanel, you can create one. Then, with the username, hostname, password port, connect the FTP client with your server.