0
votes
2answers
482 views

Using global $post; to get featured image for custom post via WP_Query

I'm using a site-wide function to add css to the <head> of the page pull in featured images of various as a responsive page background. It works great across the rest of my site but fails on a ...
0
votes
1answer
125 views

WP Query - Post Thumbnail

I am using the plugin: Series and by default it only gets the linked posts titles. I would like to add the post thumbnails as well. I was able to get the thumbnails to appear, but they show up outside ...
0
votes
1answer
66 views

the_post_thumbnail do 2 queries. How to optimize

I have query: <?php $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'orderby' => 'post_date', ...
0
votes
1answer
219 views

How WordPress attaches its Featured Images with posts?

I'm working on a WP_Query(), where I'm trying to fetch all the images using 'post_type' => attachment and 'post_parent_in' => array( 1688 )(I want to pass some more post_ids) along with other ...
0
votes
1answer
152 views

Display First posts without the default featured image

How can i display in loop (paged) the posts without the default featured image ? Here is my query of my custom taxonomy template page : <?php $term_region = get_term_by( ...
0
votes
1answer
366 views

Trying to check and see if a post has a featured image outside of the main loop

I've got a situation where I need to find out if the currently loaded post has a featured image, if it does, I want it to display a different logo than if it doesn't have a featured image associated ...
1
vote
2answers
3k views

Query posts only with featured image

I want to query 6 posts, but only those which have a featured image attached. I am using meta_key method for this with WP_Query as such: $args = array( 'post_type' => 'post', 'meta_key' ...
0
votes
1answer
432 views

Site not getting correct featured image from my query

On the home page of my site I have a series of tiles that link to various parts of the site. One tile links to the blog and I have written some code to pull the latest post with an image attached to ...
2
votes
2answers
112 views

Multiple instances of Featured Image Query

I have some custom code built into the header of my theme that gets the featured image from a post, displays the image and links to the posts permalink when clicked on by a user. The problem I am ...
0
votes
1answer
979 views

Featured images loop for Orbit Slider

To integrate Zurb´s Orbit Slider in my theme, I´m trying to generate this HTML with WordPress: <div id="featured"> <img src="featured-image-1.jpg" alt="the-alt-tag" ...
0
votes
1answer
83 views

How can I check for a thumbnail in WordPress?

How can I can I check if a post has a thumbnail and if does do something? If doesn't do something else. This is what I have: <?php if (has_post_thumbnail()) ?> <?php the_thumbnail(); ...
2
votes
2answers
1k views

Check for featured image in WP_Query

Is there a way to filter posts by featured image when initialising a WP_Query object? Example $my_query = WP_Query(array("has_thumbnail"=>true)); or, more ideally $my_query = ...
0
votes
1answer
451 views

how to put thumbnail below category's title?

Edit : ok everything works fine : i finally had to use taxonomies and get_terms, and putting everything in divs work better than lis. Thanks for your help. Hi, i have a problem with the categories ...