[resolved] Product template page best practices (3 posts)

  1. figure2
    Posted 2 years ago #

    My wife's jewelry site uses a custom theme I built for her. Initially we noticed that the woocommerce product display page broke the page.php template. After a google search I found this tutorial which recommends duplicating the page.php template, renaming it to woocommerce.php and replacing the entire loop with <?php woocommerce_content(); ?>.

    It worked well and fixed our problem but I know that in WP best practices, this line of code is usually wrapped inside a conditional statement. Am I good to go as is or should I insert this code inside an if...endif statement. If so, what should the condition be?


  2. Coen Jacobs
    Posted 2 years ago #

    We actually recommend it in a similar way: Third party / custom / non-WC theme compatibility, so yes this is how I would do it too.

  3. figure2
    Posted 2 years ago #

    Cool. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic