WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
$alt_text = get_post_meta( $id, '_wp_attachment_image_alt', true);
$output .= '<div class="pslide"><a href="' . $alt_text . '"><img src="' . $img_attr[0] . '" /></a></div>'; 

With the code i can get an image and alt text as url for each slide in my slider. Everything works just fine but unfortunately when i move my mouse over the image i can see something like this:

How can i get rid of wordpress url ?

Thanks in advance !

share|improve this question
up vote 1 down vote accepted

Always include http:// in your URLs. Change www.youtube.com in http://www.youtube.com/ or even better http://youtube.com/

If you forget the http:// then the data is being parsed like it is another page on your website rather than an external website, that's why you'll see

share|improve this answer
Yes, my fault :) Thanks for the help !! – user2587741 Oct 6 '13 at 21:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.