WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Products by Tag shortcode? (8 posts)

  1. Jason Lemahieu (MadtownLems)
    Member
    Posted 1 year ago #

    I see product_category and product_categories, but I'd really benefit from product_tag and/or product_tags shortcodes. Is there a way to do this already that I'm just missing? If not, it seems like a good addition.

    Thanks!

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

  2. travellers
    Member
    Posted 1 year ago #

    List of shortcodes available here . Hope that helps some!

  3. Ocala Website Designs
    Member
    Posted 1 year ago #

    I totally have to agree with you Jason. I don't see a way to have a page of items listed by their tag... if there is a way, can someone let us know? If not, can you guys add this to the requests? :)

    Thanks folks!

    TT

  4. shnalla
    Member
    Posted 1 year ago #

    You can try query_posts( 'product_tag=yourTag' ); .
    According to woocommerce support, it works like wordpress tags ;)

  5. shnalla
    Member
    Posted 1 year ago #

    Here is a better way to do this :

    <?php
    // The Query
    $query = new WP_Query( 'product_tag=-10%' );
    
    echo '<ul>';
    // The Loop
    while( $query->have_posts() ):
    	$query->next_post();
    	echo '<li>';
    	echo '<h3><a href="'. get_permalink( $query->post->ID ) . '">' . get_the_title( $query->post->ID ) . '</a></h3>';
    	echo get_the_post_thumbnail( $query->post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ) );
    	echo '</li>';
    endwhile;
    echo '</ul>';
    // Restore original Query & Post Data
    wp_reset_query();
    wp_reset_postdata();
    ?>

    Hope it helps !

  6. Ocala Website Designs
    Member
    Posted 1 year ago #

    Thanks I give those a try!

  7. TechDaddyK
    Member
    Posted 1 year ago #

    I'm curious... Did this work for you?

    I'm working on a site that will display different products to different groups of people. I'm planning on using something like Cimy User Extra Fields to assign attributes to users, then use product tags to filter the products to the correct users.

  8. Remi Corson
    Member
    Posted 1 year ago #

    Here is a quick snippet that works fine: http://www.remicorson.com/list-woocommerce-products-by-tags/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.