Add a button to the WordPress header

First of all, please make sure you are working on a Child Theme. Otherwise updating the theme will wipe out all the changes you made in its original files.

Add a button to the WordPress header
Add a button to the WordPress header

You May also Like these:

If you already have a child theme in place, navigate into that folder and open the file called header.php and locate for the line, Inside it adds the following code:

Book an Inspection

.header-inspection-button {
padding: .4em;
background: #fff;
color: #232425;
a.head-button {
float: right;
background-color: #fff;
padding: 10px;
color: #000;
font-size: 16px;
display: inline-block;
a.head-button:hover {
background-color: #000;
color: #fff;

Add the above CSS rule in your site’s style.css or you can add it by going to Appearance > Customize > Additional CSS.
Change the value of href property to your actual page.

You may also like these:

The above modification will create the button in the header and it will like this:

Let me know if this helps.

and save the changes. You can change the color as per your choice.

What do you think?

Written by admin


Leave a Reply

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

GIPHY App Key not set. Please check settings



Add Calculate Reading Time to WordPress site in 2020

Abstraction in Python