Learn in this tutorial how to remove an image logo link on the home page of a WordPress theme using code.
By default, most WordPress themes add a link, with the site URL, to the logo. This is interesting because it allows you to return to the home page from any page quickly and easily by clicking on the logo.
But you may want to remove this link if the user is already on the home page.
Let’s see how you can achieve this.
Snippet to remove the link or URL from an image format logo in a WordPress theme
Add the following code at the end of functions.php or in your functionality plugin:
To see this and another 917 code snippets of this website, login or subscribe here.
In this code you use the get_custom_logo
filter in combination with a conditional tag to remove the URL link of the logo on the home page.
In this example the URL is “https://www.yourwebsite.com”, but the idea is that you replace it with a custom one that fulfills the function you want.

Warning: this strategy of modifying the URL with the get_custom_logo
filter only works if you are using an image as logo.
If you are using a text logo you need to apply this Genesis filter.
If in addition to removing the link you want the mouse-over not to show the option to click on it, add this snippet to the end of the style.css file:
.title-area {
pointer-events: none;
}
Depending on the theme, the selector may change a bit, but inspecting the elements in the browser you will surely identify it quickly.
Conclusions
Now you know how to remove the logo link when it is an image on a WordPress theme home page.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉