Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $args = array(
- 'showposts' => 1,
- 'posts_per_page' => 1,
- 'offset' => $featured_offset
- );
- $featured = new WP_Query($args);
- if($featured -> have_posts()) : while($featured -> have_posts()) : $featured -> the_post();
- ?>
- <div class="post-featured">
- <div class="the-thumbnail">
- <?php
- $args = array( 'post_type' => 'attachment', 'post_parent' => get_the_ID() );
- $attachments = get_posts($args);
- if ($attachments) {
- $gambar = wp_get_attachment_image_src( $attachments[0]->ID, 'medium', false);
- ?>
- <img src="<?php echo $gambar[0]?>" />
- <?php
- }
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment