Putting the [products] in no-products-found.php breaks the page
-
Hi,
I’m trying to display featured products when no products can be found
Here’s how i’ve tried adding this to the no-products-found.php in a child theme
<p class="woocommerce-info woocommerce-no-products-found"><?php esc_html_e( 'No products were found matching your selection.', 'woocommerce' ); ?></p> <p class="woocommerce-no-products-found-show-featured"><?php esc_html_e( 'Here are some we recommend from our featured sellers:', 'woocommerce' ); ?></p> <div> <div id="no-products-found-show-featured"> <p> <?php echo do_shortcode('[products limit="4" columns="2" visibility="featured" ]') ?> </p> </div>
This causes my page to return a 503 error when loading a no products page, however if i change the shortcode to something else it is successfully displayed??
Any help appreciated, thanks
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Putting the [products] in no-products-found.php breaks the page’ is closed to new replies.