I should add that I’m using the Mins child theme. I’m trying to link the hero image to one of our product pages. I put the link in one of the text widgets, but the link jumps around depending on your monitor size/resolution. I was hoping just to make the entire hero image a link.
Hi @jimithing007,
You could use the primer_after_header hook to wrap an <a> tag around the hero element completely. But wrapping block-level elements like <div> in links can be tricky and not compatible with every browser.
So I think the fastest/cleanest way to do this would be with Javascript. Here is a link to a snippet I put together that will work.
https://gist.github.com/fjarrett/925f84475a8e8c99db6c78afdcc5e1e6
Where do I need to go to enter this? I downloaded a Header and Footer scripts plug-in and tried it there but it didn’t work. I apologize – I have no coding experience and am very new to WordPress and site building. I appreciate your help.
@jimithing007, I provided instructions on how to implement via an mu-plugin in the code comments in the Gist, as well as a link for “How to make one”.
It worked! Thanks so much.