0
votes
1answer
15 views

Surround uploaded image link with div

When you upload image you have smth like this <a href="http://vitya/wp-content/uploads/2014/06/8.jpg"> <img class="alignnone size-Small x Big wp-image-65" ...
0
votes
0answers
8 views

How to change the structure of an image attachment in a post?

I'm trying to solve a problem with the attached images in a post. Somehow the structure is not working right on a theme i'm using. Instead of showing a div with the class "wp_attachment" is just a h6 ...
2
votes
1answer
536 views

Replacing with(out) regex link to attachment by links to files

I tried to do it myself but I have really hard time with Regex (regex is hell. I just don"t understand). Anyway, I think this would be usefull to some people. The context is that we use a plugin to ...
0
votes
1answer
169 views

get_image_tag filter not working

I'm trying to get the custom field data off an attachment and display it following the image tag in a page/post using the get_image_tag filter. I'm using the same function to get the same data and ...
1
vote
1answer
604 views

Is it possible to Hook/Filters Attachment Creation?

Is it possible to hook or filter the attachment creation process? More specifically is it possible to hook into the attachment creation so that I may parse the attachment’s filename, populate the ...
1
vote
1answer
816 views

How to remove attachments size attribute [duplicate]

Possible Duplicate: Prevent Width and Height Attributes in Image Tag Output i would like to remove the width="512" height="128" attributes on an attachments this method is fine on images ...
2
votes
2answers
524 views

Best way to programatically add “rel” attributes to page and post images

For single posts and pages, I would like to add certain rel attributes to all the images on the contained therein added with the "Add Image" functionality on the edit screen. The attribute would be ...
1
vote
1answer
487 views

Can't filter wp_get_attachment_link

Can't figure out why this won't work: function my_get_attachment_link($html){ $postid = get_the_ID(); $html = str_replace('<a','<a rel="shadowbox['.$postid.']"',$html); return ...
2
votes
2answers
4k views

Add_Filter example for wp_get_attachment_link

Let me preface by saying I don't really understand Add_Filter, but I think that I want to be using it here. If not please let me know. I want to modify wp_get_attachment_link so that the link url ...
0
votes
1answer
779 views

How to display a shortcode caption somewhere other than the_content

I want to disable shortcode captions for posts in one of my themes, and display the content elsewhere, such as in a sidebar. The images aren't uploaded to wordpress, but they're linked-to using the ...