Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!

share|improve this question
add comment

3 Answers 3

enter image description here

share|improve this answer
    
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 :) –  vanjadjurdjevic Jul 8 '11 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 –  Steve Brown Jan 24 '12 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 –  Cor van Noorloos Feb 22 '12 at 19:59
add comment

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

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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.