WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Product template page best practices (3 posts)

  1. figure2
    Member
    Posted 7 months 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?

    https://wordpress.org/plugins/woocommerce/

  2. Coen Jacobs
    Member
    Posted 7 months 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
    Member
    Posted 7 months ago #

    Cool. Thanks!

Reply

You must log in to post.

About this Plugin

About this Topic