Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Feb 2016
    Posts
    3
    Member #
    53315

    Modify single-product and move grouped thumbnails (woocommerce)

    I would like modify the template to move down grouped product table and display it inline horizontal.

    My target design inline.jpg


    Now I call grouped prodcuts by code in functions.php:
    PHP Code:
        add_action( 'woocommerce_grouped_product_list_before_price', 'woocommerce_grouped_product_thumbnail' );
        
        function woocommerce_grouped_product_thumbnail( $product ) {
            $image_size = ( 'medium' );  // array( width, height ) image size in pixel 
            $attachment_id = get_post_meta( $product->id, '_thumbnail_id', true );
            ?>
            <td class="label">
              <a href="<?php the_permalink(); ?>">
                <?php echo wp_get_attachment_image$attachment_id$image_size ); ?>
              </a>
            </td>
            <?php
        
    }
    Site url: Sypialnia DIANA | Mekona Meble

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Tags for this Thread

All times are GMT -6. The time now is 06:19 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com