Infinite Loops on Single Item view
-
I’ve narrowed it down to this piece of code:
file: single-product.php<?php while ( have_posts() ) : the_post(); ?> <?php wc_get_template_part( 'content', 'single-product' ); ?> <?php endwhile; // end of the loop. ?>
<?php wc_get_template_part( ‘content’, ‘single-product’ ); ?> gives an infinite loop of the selected product. When I remove that line and just replace with a test string no loop occurs.
I’m guessing because it looks to be calling itself. With that being said, this is the exact copy from the woocommerce plugin (copied to myTheme/woocommerce) that I’m editing here. If I remove the code from the content-single-product.php file, no loops occur.can someone please help me in figuring out what really needs to go there if this is incorrect code on installation?
Thanks,
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Infinite Loops on Single Item view’ is closed to new replies.