Home Forums WoodMart support forum Add Section Before and after Product

Add Section Before and after Product

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #543039

    sphynxbeds
    Participant

    I want to add section like these in my product page. Can you guide me through this?
    https://paste.pics/6949f25d77b560258c84629ac06ca71d
    https://paste.pics/7a122c6747688680eb1044c1b21bdd05

    #543402

    Hung Pham
    Keymaster

    Hi sphynxbeds,

    Thanks for reaching to us and take our apologies for the long delay in answering.

    Navigate to Theme Settings > Single Product > Add to cart and in Content section, you can add Text or HTML Block before and after Add to cart button https://prnt.sc/YdrPYQ9rxQTH

    You can use WoodMart WooCommerce builder, which allowing you to create custom templates for Product, Product Categories pages and other functional pages that are not editable by default and you can place widgets any positions you want https://prnt.sc/AzTrNlv2BOKE

    Here below are the documentation articles:
    https://xtemos.com/docs-topic/woodmart-woocommerce-layout-builder/
    https://xtemos.com/docs-topic/single-product-page-builder/

    Best Regards,

    #543591

    sphynxbeds
    Participant

    I want to display the description of a category below the product images. If the product category belong to certain category, its extra description should show below the product images.

    #543676

    Hung Pham
    Keymaster

    Hi sphynxbeds,

    I see the descriptions are now showing below products https://prnt.sc/h37ORw3OCoGO

    Did you find the way to place it by yourself? Please confirm me back.

    Regards,

    #543693

    sphynxbeds
    Participant

    Actually I want to show it below product images in single product page

    #543951

    sphynxbeds
    Participant

    I got the solution. I used this hook woocommerce_after_single_product_summary with some custom code to achieve this.

    function woocommerce_after_single_product_summary() {
         global $post;
    
        $terms = wp_get_post_terms( $post->ID, 'product_cat' );
    
        foreach ( $terms as $term ) {
            $categories[] = $term->slug;
        }
                
        if ( in_array( 'your_category', $categories ) ) {
          echo do_shortcode('[html_block id="2222"]');
       }
            
    } 
    add_action( 'woocommerce_after_single_product_summary', 'woocommerce_after_single_product_summary', 9); 
    #543985

    Hung Pham
    Keymaster

    Hi sphynxbeds,

    Glad to hear your issue has been resolved. Keep us in mind for future questions and concerns, we’re always here to help!

    Regards,

Viewing 7 posts - 1 through 7 (of 7 total)