Skip to content

Instantly share code, notes, and snippets.

@mchandleraz
Created June 15, 2013 14:59
Show Gist options
  • Save mchandleraz/5788413 to your computer and use it in GitHub Desktop.
Save mchandleraz/5788413 to your computer and use it in GitHub Desktop.
Get WP Posts from Category 63
<?php $query = new WP_Query('cat=63');
while ($query->have_posts()) : $query->the_post();
$ico_cal = $woo_options[ 'woo_post_calendar' ] == "true";
$full_content = $woo_options[ 'woo_post_content' ] != "content";
?>
<div <?php post_class(); ?>>
<?php if ( $full_content ) { if ( $ico_cal ) { ?>
<div class="ico-cal alignleft">
<div class="ico-day"><?php the_time('d'); ?></div>
<div class="ico-month"><?php the_time('M'); ?></div>
</div>
<?php } else { woo_image( 'width='.$woo_options[ 'woo_thumb_w' ].'&height='.$woo_options[ 'woo_thumb_h' ].'&class=thumbnail '.$woo_options[ 'woo_thumb_align' ]); }} ?>
<div class="details" <?php if ( $ico_cal && $full_content ) { echo 'style="margin-left:52px;"'; } ?>>
<h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php woo_post_meta(); ?>
<div class="entry">
<?php if ( $woo_options[ 'woo_post_content' ] == "content" ) the_content(__( 'Read More...', 'woothemes' )); else the_excerpt(); ?>
</div><!-- /.entry -->
<div class="post-more">
<?php if ( $woo_options[ 'woo_post_content' ] == "excerpt" ) { ?>
<span class="read-more"><a href="<?php the_permalink() ?>" title="<?php esc_attr_e( 'Continue Reading &rarr;', 'woothemes' ); ?>"><?php _e( 'Continue Reading &rarr;', 'woothemes' ); ?></a></span>
<?php } ?>
</div><!-- /.post-more -->
</div><!-- /.details -->
</div><!-- /.post -->
<?php endif;?>
<?php endwhile;
else: ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment