• I have advanced functionality where I have a number of images that have rollover effects. Each image, when a user hovers over it, displays a black over lay with some text and a link. This works great, however, I’d like the whole overlay to be a link so the user can click anywhere on that image/overlay instead of just the text link.

    When I try to do this manually with the visual editor, by selecting the content and clicking the link icon, WordPress removes the link that i’ve just put in and nothing happens. I know this is to do with the ‘semantic’ rules of WordPress but i’m using HTML5, which permits the use of the ‘a’ tag in this way.

    I don’t want to disable auto-formatting because the administrator for the website is not so hot with HTML. How else could I get this functionality to work?

Viewing 2 replies - 1 through 2 (of 2 total)
  • In that case you have to link your whole div when you image located.

    but if you give site link then i can give you more explanation.

    thank you.

    Thread Starter egr102

    (@egr102)

    I can’t send you to a live version but this is the code to exactly what I want:

    https://jsfiddle.net/KLt8v/1/

    The problem though is that when I do this, WordPress wraps a paragraph tag around it and the link doesn’t work.

    I can’t disable auto formatting either because the editor of the site will need it enabled.

    Any thoughts?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting link URL’ is closed to new replies.