Site logo

Archived topic

Customize Single Product

8 replies · Started by xinghui on September 1, 2022

Viewing posts 1–9 of 9

How to Customize Single Product Pages,like this:
example page

Is it possible to use the function of hook blocks?

I don't quite understand it, can you tell me how to make a single product page?

Hi there,

customizing Woocoomerce pages is not simple.
What specific things on the example site would you want to copy ? Let us know and we may be able to advise.

The main differences i see on that site are:

1. The general font and color styles which can be set in the Customizer.

2. There are No Product Tabs. So do you want the Description, Reviews and Additional Information to be displayed without the tabs?

Yes,But I still want to fully customize my product page, any good way to recommend? Plugin or write a PHP product page directly

Or I can use woocommerce's product shortcode to achieve

I personally would use the action / filter hooks that Woocommerce provides to make customizations.

For example this will remove the Product Tabs but keep each of the tabs content:

// Remove
function remove_product_tabs( $tabs ) {
    unset( $tabs['description'] );
    unset( $tabs['reviews'] );
    unset( $tabs['additional_information'] );
    return $tabs;
}
add_filter( 'woocommerce_product_tabs', 'remove_product_tabs', 98, 1 );

// Tabs callback function after single content.
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_product_description_tab' );
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_product_additional_information_tab' );
add_action( 'woocommerce_after_single_product_summary', 'comments_template' );

Or the many action hooks available in the single product template, see here:

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

And those you can use PHP or the GP Block Elements to hook in content.

This archived topic is closed to new replies.