Created
September 29, 2010 23:39
-
-
Save sproutventure/603765 to your computer and use it in GitHub Desktop.
GBS Theme Homepage Loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$count = 1; | |
$deal_query= null; | |
$args=array( | |
'post_type' => 'deal', | |
'post_status' => 'publish', | |
'posts_per_page' => '3' // Change the total you want to return here | |
); | |
$deal_query = new WP_Query($args); | |
while ($deal_query->have_posts()) : $deal_query->the_post(); // Start building the content | |
?> | |
<div class="deal_block block_item_<?php echo $count ?> content"> | |
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="post_thumbnail"><?php if ( has_post_thumbnail()) the_post_thumbnail('home_thumb'); ?></a> | |
<h4><a href="<?php the_permalink(); ?>" title="<?php the_title ?>"><?php the_title(); ?></a></h4> | |
</div> | |
<?php | |
$count ++; | |
endwhile; | |
$deal_query = null; $deal_query = $temp; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment