title: display woocommerce related products under product gallery
body: <p>I removed related products from single product</p>
  
  <pre><code>remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
  </code></pre>
  
  <p>now I want to display related products under product image gallery. Here is product gallery code.  </p>
  
  <pre><code>/*******Single Product ********/
  remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
  remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
  
  add_action( 'woocommerce_product_thumbnails', 'show_product_thumbnails', 20 );
  add_action( 'woocommerce_before_single_product_summary', 'show_product_images', 10 );
  
  function show_product_thumbnails(){
      global $post, $product, $woocommerce;
  
      $attachment_ids = $product-&gt;get_gallery_attachment_ids();
      $count_gallery  = count($attachment_ids);
  
      echo '&lt;div class="thumbnails" id="gallery"&gt;';
  
      if ( $attachment_ids ) {
          echo '&lt;div class="main-slider" style="width:85%; float:right;position: relative;"&gt;'
              echo '&lt;div class="slider slider-for"&gt;';
                  foreach ( $attachment_ids as $attachment_id ) {
                      $totem_single_image = wp_get_attachment_image_src( $attachment_id, 'shop_single', true );
                      $image_link         = $totem_single_image[0];
                      $main_image_link    = wp_get_attachment_url( $attachment_id );
                      $image_title        = esc_attr( get_the_title( $attachment_id ) );
                      $image              = wp_get_attachment_image( 
                          $attachment_id, 
                          apply_filters( 'single_product_small_thumbnail_size', 'shop_single' ),
                          0,
                          $attr = array(
                              'title' =&gt; $image_title,
                              'alt'   =&gt; $image_title
                          )
                      );
  
                      echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '&lt;a href="%s" class="elevatezoom-gallery" title="%s"&gt;&lt;img class="lily_zoom" src="%s" alt="%s" data-zoom-image="%s"&gt;&lt;/a&gt;', $main_image_link, $image_caption, $image_link, $image_title, $main_image_link), $attachment_id, $post-&gt;ID );  
                  }
              echo '&lt;/div&gt;';
          echo'&lt;/div&gt;';
  
          echo '&lt;div class="pagination" style="width:13%; display:block;"&gt;';
              echo '&lt;div class="slider slider-nav" role="toolbar"&gt;';
                  foreach ( $attachment_ids as $attachment_id ) {
                      $totem_single_image = wp_get_attachment_image_src( $attachment_id, 'medium', true );
                      $image_link         = $totem_single_image[0];
                      $main_image_link    = wp_get_attachment_url( $attachment_id );
                      $image_title        = esc_attr( get_the_title( $attachment_id ) );
                      $image              = wp_get_attachment_image( 
                          $attachment_id, 
                          apply_filters( 'single_product_small_thumbnail_size', 'shop_single' ), 
                          0, 
                          $attr = array(
                              'title' =&gt; $image_title,
                              'alt'   =&gt; $image_title
                          )
                      );
  
                      echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '&lt;img src="%s" alt="%s"&gt;&lt;/a&gt;', $image_link,$image_title), $attachment_id, $post-&gt;ID );  
                  }
              echo '&lt;/div&gt;';
          echo '&lt;/div&gt;';
      }
      echo '&lt;/div&gt;';
  }
  
  function show_product_images(){
      global $post, $woocommerce, $product;
  
      echo '&lt;div class="images lily-main-image"&gt;';
  
          if ( has_post_thumbnail() ) {
              $image_caption   = get_post( get_post_thumbnail_id() )-&gt;post_excerpt;
              $main_image_link = wp_get_attachment_url( get_post_thumbnail_id() );
              $image           = get_the_post_thumbnail( 
                  $post-&gt;ID, 
                  apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), 
                  array(
                      'title'           =&gt; get_the_title( get_post_thumbnail_id() ),
                      'data-zoom-image' =&gt; $main_image_link, 
                      'id'              =&gt; 'totemImgZoom'
                  )
              );
  
              $attachment_count = count( $product-&gt;get_gallery_attachment_ids() );
              // echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '&lt;img width="320px"src="%s" id="totemImgZoom" data-zoom-image="%s" title="%s" alt=""&gt;', $main_image_link, $main_image_link, $image_caption), $post-&gt;ID);   
          }
          else {
          //  echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '&lt;img class="zoomImage" src="%s" alt="%s"/&gt;', wc_placeholder_img_src(), __( 'Placeholder', 'woocommerce' ) ), $post-&gt;ID );
          }
  
          do_action( 'woocommerce_product_thumbnails' );
          do_action( 'woocommerce_output_related_products');
  
      echo '&lt;/div&gt;'; 
  }
  </code></pre>