Tagged Questions
-1
votes
2answers
169 views
Open attachments in new tab/window
I'm trying to make every attachment link open in a new tab/window but checking the 'Open link in a new tab' checkbox in the post editor or adding target="_blank" manually doesn't seem to work. Links ...
0
votes
3answers
806 views
How can I get a different image size, if all I have is the link?
For various reasons, I can't use Wordpress' built-in Thumbnail functionality.
What I want to do instead is to use the first image in the post as the thumbnail.
Here's what I found in the codex: Show ...
3
votes
1answer
2k views
remove links from images using functions.php
I am looking for a way to remove the attachment link from images in the post content.
I would like to add this to the functions.php in my theme. I know you can disable this in the post on a per ...
4
votes
5answers
4k views
Disable image attachment links
Is there a way to disable image attachment links trought a filter in functions.php or something ? I know it's possible to do it manually when you add an image to a post but I want to disable this ...
1
vote
1answer
445 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 ...
1
vote
1answer
1k views
Link Attachment Image to Category
How do you link an attachment image to its category?
function wp_attachment_image($size = thumb) {
if($images = get_children(array(
'post_parent' => get_the_ID(),
...