0
votes
0answers
29 views

Incomplete attachment page

I am using the twenty-thirteen theme and my attachment page chops off the footer & image. Have a look at my screenshot. You can see that it shows the title but it doesn't show the image and the ...
0
votes
0answers
41 views

How to show post attachment image

i am going to create a slidershow by post attachment in single.php. i use this code but the result is null. <?php if ( have_posts() ) while ( have_posts() ): the_post(); ...
0
votes
1answer
46 views

wp_query for displaying attachments with a tag

So I am running the following query: <?php $args = new WP_Query(array( 'post_type' => 'attachment', 'posts_per_page' => -1, 'oderby' => 'title', ...
0
votes
1answer
37 views

Exact image sizes

I am trying to define an image size of exactly 290 height x 180 width for all images uploaded to my WP site. I tried updating image sizes under Settings->Media->Image Sizes but these are only max ...
1
vote
1answer
331 views

How to paginate attachments in a secondary query as gallery?

I have this code that shows all images attached to my post-type. Is there a way to paginate those? I have like 25 pics and I wan't to avoid scroll as much as I can. Code: <div class="galleries ...
0
votes
1answer
75 views

How to retrieve “custom url” from image attachment in wordpress

I have uploaded a bunch of images to a post and set the 'custom url' for each of them in the media uploader. How can I retrieve the custom URL assigned to each image into $caption_text= at the ...
0
votes
1answer
103 views

Unable to get wp_get_attachment_url to show

I'm trying to show a link to the full size image of an attached image. I took a code for Wordpress' Twelve Thirteen theme: <?php $metadata = wp_get_attachment_metadata(); printf( '<span ...
0
votes
1answer
85 views

Retreive tags from attached post for media on page

I am working on a custom template file that pulls all images in my Media Library with a specific tag. I was able to get this working with some help from the community, it also shows the title of the ...
0
votes
1answer
263 views

Get title of post image is attached to

So I found this post: Find the post an attachment is attached to and implemented Chip's suggestion but having a weird outcome. I am trying to pull the title of the post that the specific image is ...
0
votes
1answer
75 views

Get a Page's attachments in Gallery order

Having created a page and a gallery within that page, I would like to retrieve all the images in that gallery in the order they are set when the gallery is created, i.e. the order which I drag them in ...
0
votes
1answer
65 views

Get Attachment Image Class by attachment id

I want Get wordpress media library image class. I have attachment id and I tired this but won't able to get it. print_r(wp_get_attachment_image_src( $attachment_id, $size, $icon, $attr )); How can ...
0
votes
1answer
88 views

list of attachments: wp_get_attachment_link works, wp_get_attachment_image does not

On single.php theme template file, I'm displaying the post's list of attachments. global $post; $args = array( 'post_type' => 'attachment', 'numberposts' => null, 'post_status' ...
1
vote
1answer
231 views

Exclude featured image from attachment loop

For my jigoshop theme I'm able to retrieve the images attached to my product post. However it pulls all images from both the featured image and my metabox images. What I'm trying to do is make it so ...
0
votes
1answer
404 views

Load post attached images on a single page site with fancybox

I'm trying to make a single page site that will display posts as thumbnails in some part. Then if a thumbnail is clicked, I want all the images contained in this post to be loaded with fancybox while ...
0
votes
1answer
99 views

How to attach images that I “insert from url” into the post?

I'm trying to get the list of images in my post, to display them in the front page... the problem is that when I add a new picture from a URL, it doesn't seem to attach it. $images =& ...
0
votes
1answer
44 views

What is the most efficient way to retrieve a group of image URL's from different attachment ID's of a specific crop size?

I have a basic slider plugin that I am attemping to make more efficient. This plugin collects an array of attachment ID's from the user to represent each image of the slider. With these attachment ...
0
votes
1answer
520 views

How to get the next and previous image title from attachment or gallery?

I'm trying to build a slider exactly like this in wordpress. I have managed to make the slider work except the next/prev button. I need to get the next image title and the previous image title for the ...
1
vote
2answers
355 views

Change code to display image attachment page

I have this code which displays images with their captions in a list. On clicking caption, opens image in an attachment page, but clicking on image, opens that image with a dark-gray background. Is ...
1
vote
2answers
777 views

Removing width and height attributes from wp-get-attachment

I'm using this http://www.ghosthorses.co.uk/production-diary/removing-inline-img-dimensions-for-responsive-wordpress-websites/ to remove the height and width attributes of images. Everything works ...
1
vote
1answer
2k views

Adding width and height to wp_get_attachment_image_src

I'm trying to add the width and height attributes to the wp_get_attachment_image_src. Why is this returning width and height:0? <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( ...
3
votes
1answer
146 views

get post attachments of a particular size

Is there a good way to know if a post has an image attachment of a particular size? I'm trying to fetch 5 random posts, but I only want results that have image attachments with a (custom) size of ...
0
votes
1answer
152 views

Correct attachment size

I am trying using Really Simple slideshow with Wordpress and I am having issue while trying to retrive the correct image size for the slideshow. I am able to retrieve the first image without problem ...
0
votes
1answer
431 views

Possible to add “Even/Odd Classes” to image attachments via wp_get_attachment_image?

Im looking for a way to add an alternating even/odd class directly to each image attachment when its outputted via my function below: <?php function nongallery_img_slide( $post_id = null ) { ...
2
votes
1answer
226 views

query attachments of parent page if attachments of current page are smaller than …

I'm using WPQuery and get_children($query_images_args) to query attachments from the current page. If the current page has no attachments assigned I'm querying the images of the parent page. This ...
2
votes
1answer
632 views

query attachment images … if no attachments -> get attachments of parent page?

I use this to query all attachments of the current page or post I'm on … $query_images_args = array( 'post_type' => 'attachment', 'post_mime_type' =>'image', 'post_status' => ...
0
votes
1answer
737 views

WP_Query: attachment image in “full” size?

I'm using the following script for my current project. $query_images_args = array( 'post_type' => 'attachment', 'post_mime_type' =>'image', 'post_status' => 'inherit', ...
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 ...