Support

Account

Home Forums Add-ons Repeater Field Repeater breaks wordpress slider

Unread

Repeater breaks wordpress slider

  • I have a content managed slider in wordpress, when I add in my code for a repeater it breaks and will not render front end. If I remove the slider the repeaters render correctly.

    <div class="medium-12 relative">
    		<ul class="rslides" id="slider1">
    				<?php
    					$args = array('post_type' => 'slide', 'posts_per_page' => 5);
    					$loop = new WP_Query($args);
    					while ($loop->have_posts()) : $loop->the_post(); ?>
    						<li>
    							<?php the_post_thumbnail(); ?>
    							<div class="caption">
    								<h2 class="mega"><?php the_title(); ?></h2>
    								<?php the_content(); ?>
    							</div>
    						</li>
    				<?php endwhile; ?>
    		</ul>
    	</div>
    	
    	<div class="">
    		<h2 class="medium-12 mega normal margin-btm-med">Information about our products</h2>
    		
    			<?php 
    			$rows = get_field('products-lister');
    			if($rows)
    			{
    			 
    				foreach($rows as $row)
    				{
    					echo 	'<div class="medium-3">
    								<img class="margin-btm-small" src=" '   . $row['product-image'  ] . ' " alt="" />
    								<h3 class="alpha"><a href=" '  .$row['product-title-link' ] . ' "> '  .$row['product-title' ] . '</a></h3>
    								<p>'  .$row['product-description' ] . '</p>
    										'  .$row['content' ] . '
    							</div>'  ;
    				}
    			 
    			}
    			
    			?>
    	</div>
Viewing 1 post (of 1 total)

The topic ‘Repeater breaks wordpress slider’ is closed to new replies.