[Resolved] Woocommerce product page 1 column

Home Forums Support [Resolved] Woocommerce product page 1 column

Home Forums Support Woocommerce product page 1 column

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2068443
    Daniel

    Hello,
    In woocommerce, it’s possible to modify the template of the product page , and that everything appears in one column?

    We need you to get out first title + price to appear first, then the images and lastly a brief description, purchase button, etc.

    Thanks!

    #2068624
    David
    Staff
    Customer Support

    Hi there,

    so GP doesn’t interfere with Woocommerce templates, which is handy as it means you can use Woo hooks to move stuff around.
    First off this handy guide shows where the hooks are and what functions are loaded on the single product:

    https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/

    Now we can then:

    1. Add the following PHP Snippet to unhook the woocommerce_show_product_images function and add it back in below the price:

    remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
    add_action( 'woocommerce_single_product_summary', 'woocommerce_show_product_images', 11 );

    How to Add PHP: https://docs.generatepress.com/article/adding-php/

    2. Then its just a little CSS to make sure the Image fills the content width:

    .woocommerce #content div.product div.images, .woocommerce div.product div.images, .woocommerce-page #content div.product div.images, .woocommerce-page div.product div.images {
        float: none;
        width: 100%;
    }
    #2068722
    Daniel

    Yeah, it works! thanks 🙂

    #2069101
    David
    Staff
    Customer Support

    Awesome – glad to hear that

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.