WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WooCommerce - excelling eCommerce] permalink (1 post)

  1. mireillesan
    Member
    Posted 1 year ago #

    I make use of woocommerce random products widget for my affiliate products.
    Right now, when I visitor clicks on one of the products it will go the product page and then there's a buttonlink to visit the affiliate shop.
    I'd like to change this a bit. Once the visitor click on the product link it should go directly to the affiliate shop. Can anyone help me with that?
    Here's my code:

    <ul class="product_list_widget">
    			<?php while ($query->have_posts()) : $query->the_post(); global $product; ?>
    			<li>
    			<?php echo $product->get_categories( ', ', ' <p class="biopostedin">'.__('', 'woocommerce').' ', '</p>'); ?>
    
    			<a href="<?php the_permalink() ?>">
    			<?php
    			if ( has_post_thumbnail() ) {
    			the_post_thumbnail('shop_thumbnail');
    			} else {
    			echo '<img src="'. woocommerce_placeholder_img_src() .'" alt="Placeholder" width="'.$woocommerce->get_image_size( 'shop_thumbnail_image_width' ).'" height="'.$woocommerce->get_image_size( 'shop_thumbnail_image_height' ).'" />';
    			} ?>
    			<p class="biocatwoo"><?php the_title() ?></p>
    			</a>
    			<p class="biopricewoo"><?php echo $product->get_price_html() ?></p>
    
    			</li>
    			<?php endwhile; ?>
    			</ul>

Topic Closed

This topic has been closed to new replies.

About this Topic