Skip to content

Instantly share code, notes, and snippets.

@stankobrin
Created August 10, 2014 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stankobrin/f0d19b2bdc5f0f77b8e4 to your computer and use it in GitHub Desktop.
Save stankobrin/f0d19b2bdc5f0f77b8e4 to your computer and use it in GitHub Desktop.
query
<?php
if ( $query->have_posts() ) { ?>
<?php $count = 0; ?>
<?php while ( $query->have_posts() ) {
$query->the_post();
?>
<?php $count++; ?>
<div class="orderresultholder" id="result<?php echo $count; ?>">
<table class="orderresult" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?php the_field('style_code');?></td>
</tr>
<tr>
<td><?php $terms_as_text = strip_tags( get_the_term_list( $query->post->ID, 'sizes', '', ', ', '' ) ); echo $terms_as_text;?></td>
</tr>
<tr>
<td><?php $sellprice = get_field('selling_price', $query->ID); echo "R ".number_format($sellprice, 0);?></td>
</tr>
<tr>
<td><?php apf_post_form();?>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</div>
<?php }
} else { ?>
<?php echo 'no post found'; } ?>
<?php
/* Restore original Post Data */
wp_reset_postdata();
} ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment