WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Move Woocommerce product tags (1 post)

  1. xaifu
    Member
    Posted 6 months ago #

    I'm trying to move woocommerce product tags after main content in my template.

    I'm using this code:

    <?php do_action('woocommerce_before_main_content'); ?>
    
    	<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    		<?php woocommerce_get_template_part( 'content', 'single-product' ); ?>
    
    			<?php do_action( 'woocommerce_product_meta_start' ); ?>
    
    				<?php
    					$size = sizeof( get_the_terms( $post->ID, 'product_tag' ) );
    					echo $product->get_tags( ', ', '<span class="tagged_as"><i class="icon-tag"></i> ' . _n( 'Tag:', 'Tags:', $size, 'woocommerce' ) . ' ', '.</span>' );
    				?>
    
    			<?php do_action( 'woocommerce_product_meta_end' ); ?>
    
    	<?php endwhile; ?>
    
    	<?php do_action('woocommerce_after_main_content');?>

    But it displays product tags under related products and under some share buttons from jetpack plugin and I want product tags to be just under the product description but I'm unable to find out how to acomplish it.

    Any suggestions? maybe using a function or some hooks?

    http://wordpress.org/plugins/woocommerce/

Reply

You must log in to post.

About this Plugin

About this Topic