1

When image is being added in a post it is being wrapped with a <a href></a> I want to know which class controls this segment and where I can find a decent doc for this kind of problems because wp docs sucks when it comes to development and I just started working with WordPress and I don't want to dig in a bunch of code just to solve a simple problem. Cheers!

3 Answers 3

6

enter image description here

3
  • Nah I know that :) The situation is following : I have a filter that wraps every image to a single div so I can make some design tweaks and that filter consists of simple wrap like this : '<div>' . $data . '</div>' but when I reload the page everything gets wrapped with an <a href></a> element and it becomes this : "<a href='theurl'><div>" . $data . "</div></a>" so I am asking how to get rid of that <a> tag. At least could you give me a clue in which .php script it is being rendered cause I don't have time to dig in all those WP core files for this simple thing. Thanks for your help :) Jul 8, 2011 at 14:17
  • You can get Wordpress to "click here while uploading the image" automatically if you use the Remove Link URL plugin ;) wordpress.org/extend/plugins/remove-link-url Jan 24, 2012 at 1:31
  • Can't help you with the exact details, but this question will probably help you out wordpress.stackexchange.com/a/42679/5424
    – user5424
    Feb 22, 2012 at 19:59
2

Goto Settings->Media->Auto-embeds->Uncheck the box( When possible, embed the media content from a URL directly onto the page).Hit save and problem solved.This is the Permanent way.:) enter image description here

1

How about a plugin that effectively "clicks" the none button for you automatically?

Check out "Remove Link URL" which removes the link by default but still allows it to be added back

screenshot-1.png?r=494378 http://img208.imageshack.us/img208/56/screenshot1vk.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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