Hi niklar. You will have to edit the code in your theme’s header.php file in order to remove the link in the header image.
Navigate to header.php in your dashboard area and locate the following code:
<a href="http://culturedcarpbaits.co.uk/">
<img src="http://culturedcarpbaits.co.uk/wp-content/uploads/2013/04/cropped-BLACK-BACKGROUND-WORDING-AND-LOGO-and-difference1.jpg" width="1000" height="230" alt="">
</a>
Remove the surrounding <a> tags that are around the <img> so that you are left with just:
<img src="http://culturedcarpbaits.co.uk/wp-content/uploads/2013/04/cropped-BLACK-BACKGROUND-WORDING-AND-LOGO-and-difference1.jpg" width="1000" height="230" alt="">
This will remove the hyperlink from the image. I hope this helps, let me know if it works for you.
i suppose you should search the header.php and remove the ahref from the img
This is the code you’re looking for:
<header id="branding" role="banner">
<hgroup>
<h1 id="site-title"><span><a href="http://culturedcarpbaits.co.uk/" title="home" rel="home">home</a></span></h1>
<h2 id="site-description">info@culturedcarpbaits.co.uk</h2>
</hgroup>
<a href="http://culturedcarpbaits.co.uk/">
<img src="http://culturedcarpbaits.co.uk/wp-content/uploads/2013/04/cropped-BLACK-BACKGROUND-WORDING-AND-LOGO-and-difference1.jpg" width="1000" height="230" alt="">
</a>
<div class="only-search with-image">
</div>
Remove the a href so you’ll end up with something like this:
<header id="branding" role="banner">
<hgroup>
<h1 id="site-title"><span><a href="http://culturedcarpbaits.co.uk/" title="home" rel="home">home</a></span></h1>
<h2 id="site-description">info@culturedcarpbaits.co.uk</h2>
</hgroup>
<img src="http://culturedcarpbaits.co.uk/wp-content/uploads/2013/04/cropped-BLACK-BACKGROUND-WORDING-AND-LOGO-and-difference1.jpg" width="1000" height="230" alt="">
<div class="only-search with-image">
</div>
@siobhyb: you we’re faster π
Why are we modifying the header.php file?
Shouldn’t we be doing this from a child theme… and modifying the header.php file in that location?
When you edit the header.php file directly… all of your changes and customizations are going to be lost the next time you update your theme.
Just saying…
We are modifying header.php because it’s the file that needs to be edited.
Of course,it’s recommended to use child themes and make changes there.
Thread Starter
niklar
(@niklar)
Thanks for the help, not sure what to do now, from what I’ve learnt so far (only been at it a week) josh’s point sounds familiar! Should I be editing the child theme?
@niklar: Sorry for not being clearer. Create a copy of header.php in your child theme and edit is as Media X and I mentioned. Any file added to the child theme will overwrite the file in the parent theme.
More information on including template files in your child theme can be found in the codex: http://codex.wordpress.org/Child_Themes#Template_Files
Thread Starter
niklar
(@niklar)
It took me a while but it worked!! thanks siobhyb, media x and josh! top help!!
Congrats!!
And now you’re doing it the WP “best practices” way π
Glad you worked it out. π