Create a WooCommerce Featured Products Loop of Featured Images

Here is a guide on how to create a WooCommerce featured products loop of featured images. The featured product option is chosen from the star column in the WordPress dashboard backend of the WooCommerce products, ‘featured‘ it is a term that belongs to the taxonomy named ‘product_visibility‘.

 

Woocommerce Featured Product Loop

 

So in the above a shortcode is created; [woo_featured_products] ready to place anywhere on the site, the featured term is set in the taxonomy query and passed into the WP_Query arguments. The loop is output with just the featured image wrapped in the product page link.

This makes adding a featured Product Category unnecessary and makes is easier to change which products are output. You can cap the amount of products output by adjusting the post_per_page value.

1 Comments

  1. Bart on March 15, 2021 at 10:10 am

    Hello Neil,

    I would like to add short description and a (custom) translatable button (with link to product) to this featured product shortcode. Button text need to be something like: “More about this product”. Is that possible? Thanks for your help and great blog posts!

    Kind Regards,
    Bart

Leave all Comment