Make a photo on page linkable

Asked by:
none / 94 Points
Time:
2012-10-19 12:40 pm EST
Category:
Wordpress
Hits:
326
1. I would like to assign the link to a youtube video to a photo on my site. My site is built with WordPress. I've tried using the link associated with the photo image but that did not work.
I have successfully added a link to the caption on the photo. Is this the best alternative?

2. Since I didn't like the look of the inbed code generated on You Tube, I'm simply trying to use the address for the link.

To ask this user for more information, please first login.

To submit an answer, please login.

Best answer chosen by User

0

JacobN
Staff
3,661 Points
2012-10-19 1:00 pm EST
Hello, and thanks for the question.

It sounds like what you're trying to do is simply provide a link to a YouTube video, but using an image of your choice that visitors can click on. If this is the case, in WordPress you'd want to switch over to the [HTML] tab instead of [Visual] in the editor. Then you can simply setup your link this way:

<a href="http://www.youtube.com/embed/A3PDXmYoF5U"><img src="http://YourDomain.com/wp-content/images/YouTube.jpg">YouTube Video</a>

Essentially what you're doing is surrounding a standard <img> tag that has the source of the image you'd like to use in your link, with an anchor tag <a> pointing to the YouTube video you'd like played when the user clicks on that link. In this example I also simply put the text "YouTube Video" in-between the anchor tags as well so that it's obvious it's a link. However the image itself should be clickable, and if you prefer to remove the text the image will still link there without any issues.

Please give this a shot and let us know if this is exactly what you were trying to accomplish, or if you were possibly looking for something a bit different.

- Jacob

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.