Skip to content

Instantly share code, notes, and snippets.

@Ravenna
Created March 21, 2012 02:37
Show Gist options
  • Select an option

  • Save Ravenna/2143867 to your computer and use it in GitHub Desktop.

Select an option

Save Ravenna/2143867 to your computer and use it in GitHub Desktop.
checkbox feature
<?php
$featured_query = new WP_Query(
array(
'post_type' => 'artist',
'post_per_page' => '3',
'meta_key' => 'featured',
'orderby' => 'meta_value',
'order' => 'DESC',
'meta_query' => array(
array(
'key' => 'featured',
'value' => '1',
'compare' => '=',
'type' => 'INTEGER'
)
)
)
);
?>
<div id="home_big">
<?php if ($featured_query->have_posts()) : while ($featured_query->have_posts()) : $featured_query->the_post();?>
<div class="home_featured" >
<a href="<?php the_permalink() ?>"><?php the_post_thumbnail('large'); ?></a>
<<div class="feat_desc">
<div class="feat_desc_content">
<h2>FEATURED ARTIST : <a href="<?php the_permalink();?>"><?php the_title(); ?></a></h2>
<a href="<?php the_permalink();?>"><?php $content = get_the_content(); echo substr($content, 0, 80); ?>... Read more</a>
</div>
</div>
</div>
<?php endwhile; endif; wp_reset_query(); ?>
</div><!-- End Home Big-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment