Motif theme – How to add links on a featured image?
-
Hi there,
Is it possible to add links on specific areas of a featured image?
For instance, on the featured image of the front page of my blog, I would like to make the area of the word “Stratégie” clickable. Is something we can do with CSS?If it is not possible, how can I add a link on the whole image (so that when someone clicks on it, it points toward another page of the blog)?
Thanks a lot for your help!
Amitiés,
Marine
The blog I need help with is: (visible only to logged in users)
-
CSS cannot be used to change functionality so what you’re asking is not possible. However there are a couple of ways you could achieve the same effect using workarounds although they are quite complicated. I’m not going to be able to provide the code as it would be a considerable amount of work, but the idea is free!
The first option would be to use an image map, create the necessary HTML and include it in a text widget and then use CSS to pin it to the top of your site over or in place of your existing title. I’m not sure how easy/effective the positioning would be in your theme because it is responsive. You would need to set all the link co-ordinates and URLs in the HTML so if you ever wanted to change them in the future you would need to re-create the image and the mappings.
Another possibility might be to create a custom menu and then move each element to the desired location and use the CSS transform property to rotate them as you see fit. This way the links would be taken care of as part of the WordPress menu features although you’d run into the same responsive issues when the browser is resized or people view your site on a tablet or smartphone.
Failing that you can upload a header image that, when clicked, takes you to the homepage via Appearance > Customize > Header. Should you want the image to link to another page then using the repositioned widget technique I mentioned earlier but with an image widget should work too.
-
- The topic ‘Motif theme – How to add links on a featured image?’ is closed to new replies.