Tagged Questions
2
votes
2answers
113 views
How might I retrieve a featured post image from an external WP site and display it as a link back?
I have two WP sites. I want to reach from one of them, into the other, and retrieve specific featured images for posts, and display them with a link to that post.
I am using this line (with the ...
1
vote
1answer
312 views
How to add image attachment to post from a single meta key (Woocommerce)
I'm using Woocommerce for products. All products are imported automatically by a plugin.
Currently when i want to attach an image to a product (a post type) i have to use "Featured image" to display ...
1
vote
2answers
233 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 ...
0
votes
1answer
209 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 ) {
...
0
votes
0answers
74 views
Style Taxonomy Image [closed]
How do I style my image fetched for a custom taxonomy term?
The code below is used to fetch the image attached to the taxonomy term, and subsequent line of codes display the taxonomy term name.
The ...
2
votes
1answer
155 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 ...
0
votes
1answer
124 views
Attachment Image using wrong src?
I've had some issues recently with this code below to display the featured image of a page:
add_theme_support( 'post-thumbnails' );
add_image_size("homepageFeatured", 250, 250, false);
...
2
votes
1answer
430 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
468 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',
...
0
votes
1answer
165 views
Get single image from custom fields made with WCK custom fields creator
I used WCK Custom Fields Creator to create a repeatable custom field for uploading pairs of images (one color, one black and white) to posts. So for example, one post may have three fields, with two ...
2
votes
1answer
217 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
3answers
2k 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 ...