Skip to content

Instantly share code, notes, and snippets.

@vajrasar
Created August 1, 2015 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vajrasar/468bd3c15681c8b877fa to your computer and use it in GitHub Desktop.
Save vajrasar/468bd3c15681c8b877fa to your computer and use it in GitHub Desktop.
Jetpack Issue
<div class="row">
<?php
$prod_arch_args = array(
'post_type' => 'products',
'posts_per_page' => '12',
'paged' => get_query_var( 'paged' ),
);
$prod_arch_query = new WP_Query( $prod_arch_args );
if( $prod_arch_query->have_posts() ) {
while( $prod_arch_query->have_posts() ) {
$prod_arch_query->the_post();
$prod_images = get_post_meta( $post->ID, 'cmb2_prod_images', true );
$prod_price = get_post_meta( $post->ID, 'cmb2_prod_price', true );
?>
<div class="col-xs-12 col-sm-6 col-md-4 product-main wow fadeInUp">
<figure itemscope itemtype="http://schema.org/Product" class="product-item relative">
<div class="product-display">
<div class="list-pic">
<a href="<?php the_permalink(); ?>">
<?php
foreach ($prod_images as $key => $value) {
?>
<?php echo wp_get_attachment_image( $key, 'prod-list', 'itemprop = image' ); ?>
<?php
continue;
}
?>
</a>
</div>
<div class="view-detail"><a href="<?php the_permalink(); ?>">View Detail</a></div>
</div>
<figcaption class="relative">
<div class="pro-list-title" >
<h3 itemprop="name">
<a href="#"><?php the_title(); ?></a>
</h3>
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="pro-list-rates">
<div class="pro-list-rates-new">
<span itemprop="priceCurrency">
<i class="fa fa-inr"></i>
</span>
<span itemprop="price"><?php echo $prod_price; ?></span>
</div>
</div>
<div class="add-container">
<!-- <a class="btn btn-1 btn-1a">
<i class="fa fa-cart-plus"></i> Add to container</a> -->
<?php vg_after_entry(); ?>
</div>
</figcaption>
</figure>
</div>
<?php
}
the_posts_navigation();
wp_reset_postdata();
}
?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment