WordPress core function to retrieve the attachment image (object)

learn more… | top users | synonyms

1
vote
2answers
171 views

Exclude images uploaded via meta boxes from Wordpress gallery

I am using the following simple get attachment code to display all images attached to a certain post but I want to be able to exclude the images uploaded via a couple of custom meta boxes that are ...
0
votes
1answer
431 views

Using add_image_size in functions.php to get original uploaded file

It is possible to use add_image_size in functions.php to get the original uploaded file size. Because when I uploaded the images to my posts I cropped them in order to have 1x1 ratio for all my image ...
0
votes
1answer
1k views

How to get both image attachment ID and url

I am using advanced custom fields repeater-field to get the image url like this: <?php the_sub_field('billede'); ?> But I also want to get the attachment ID for the image, to be used for ...
0
votes
1answer
338 views

Returning an image url from its attachment ID using a custom post type plugin

I'm using a custom post type plugin that returns an uploaded file's attachment ID instead of its url. I've been able to get the image to display using wp_get_attachment_image_src as outlined in the ...
0
votes
1answer
84 views

add_filter with specific thumb names

How would I run add_filter only on some specific registered thumbnail sizes '$size' ? like 'large' , 'medium', etc?
2
votes
1answer
427 views

Prevent Width and Height Attributes in Image Tag Output

I'm trying to control the output of the random image within this bit of code. The end goal is to NOT output the width and height attributes for the image. I want this: <img src="URL HERE" ...
1
vote
1answer
3k views

get the attachement url for the medium sized image

Hi I'm using some code to create a slideshow with lytebox functionality - the following code is used in the loop to pull each image attached to a post in sequence. It seems to be only pulling the ...
1
vote
3answers
3k views

use wp_get_attachment_image() to show attachments

I really hope this is a facepalm moment, b/c i'm getting frustrated with this. Making a quick loop to show certain attachment images. lifted it almost straight from the codex but ...