Skip to content

Instantly share code, notes, and snippets.

@dannewns
Created January 18, 2013 10:16
Show Gist options
  • Save dannewns/4563610 to your computer and use it in GitHub Desktop.
Save dannewns/4563610 to your computer and use it in GitHub Desktop.
$attachments = new Attachments( 'attachments', $post->ID );
if( $attachments->exist() ) :
$attachment->get_single(0);
cats = get_the_terms($post->ID, 'portfolio_categories');?>
<li>
<a href="">
//cant do the below because it just wont work
<?php echo $attachment->image( 'portfolio-small' ); ?>
<div class="project-content">
<h3><?php the_title() ?></h3>
<p><? foreach ($cats as $cat):?><?=$cat->name?><? endforeach;?></p>
</div>
</a>
</li>
<?php
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment