Tagged Questions
0
votes
1answer
234 views
Why use foreach to get attachment_id if numberposts is equal to 1?
I needed to pass an image to a Pinterest plugin in posts without a Featured Image so I wrote a little function to get the id of the first picture in a post. This code is in the loop-single.php where ...
0
votes
2answers
152 views
How to check all items in a loop have post thumbnail?
Currently I have the following loop:
<?php
$shows_sales = get_posts(array(
'post_type' => 'show_sale',
'post_status' => 'publish',
'posts_per_page' => 3,
));
$done_image = ...