Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $gallery_loop = new WP_Query(array(
- 'post_status' => 'publish',
- 'order' => 'ASC',
- 'posts_per_page' => -1, // Qui scegli il numero di post da mostrano -1 = tutti
- 'cat' => 2, // Qui l'id della categoria interessata
- ));
- while($gallery_loop->have_posts()): $gallery_loop->the_post(); ?>
- <?php
- $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
- echo $url; // Qui stampi l'url della thumbnail del post
- ?>
- <?php endwhile; ?>
- <?php wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement