Skip to content

Instantly share code, notes, and snippets.

@amanhstu
Last active November 28, 2016 15:10
Show Gist options
  • Save amanhstu/990bbbcb989ac0d9a90b47d1c2bd117b to your computer and use it in GitHub Desktop.
Save amanhstu/990bbbcb989ac0d9a90b47d1c2bd117b to your computer and use it in GitHub Desktop.
<?php while ( have_posts() ) : the_post(); ?>
<div class="main-content">
<div class="main-wrap">
<div class="col-sm-12">
<div class="breadcrumbs">
<?php if(function_exists('bcn_display')) { bcn_display(); }?>
</div> <!-- breadcrambs ends here -->
</div><!-- col-sm-12 ends here -->
<?php // check for rows (parent repeater)
if( have_rows('product_page') ): ?>
<div class="col-lg-12 row product-row">
<?php
// loop through rows (parent repeater)
while( have_rows('product_page') ): the_row(); ?>
<div class="col-sm-12">
<div class="marque">
<span class="brand-lg"><img src="<?php the_sub_field('brand_image'); ?>" /></span> </div>
</div>
<?php
// check for rows (sub repeater)
if( have_rows('post_repeater') ): ?> <div class="col-sm-12 product-item-row">
<?php
// loop through rows (sub repeater)
while( have_rows('post_repeater') ): the_row();?>
<div class="col-sm-3 product-item">
<?php $postobject = get_sub_field('product_post'); ?>
<a href="<?php $postURL = get_permalink($postobject->ID);?>">
<img class="product-img" src="<?php bloginfo('template_directory');?>/images/product-images/321600_moelleux_blanc_trepais.png" width="100%" />
<p class="product-name"><?php the_title();?></p>
<p class="product-seemore">See More</p> </a>
</div><!-- col ends here -->
<?php endwhile; ?>
</div><!-- col Product Items row here -->
<?php endif; //if( get_sub_field('items') ): ?>
<?php endwhile; // while( has_sub_field('to-do_lists') ): ?>
</div><!-- col lg 12 ends here or row ends here -->
<?php endif; // if( get_field('to-do_lists') ): ?>
<?php endwhile; // end of the loop. ?>
</div><!-- main wrap ends here -->
<div class="clr"></div>
</div><!-- main content ends here -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment