<?php
$args = array( 'post_type' => 'post_name');
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
$postid = get_the_ID();
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail_size' );
$url = $thumb['0'];
?>
No comments:
Post a Comment