Support » Plugin: WooCommerce » [Plugin: WooCommerce – eCommerce plugin for WordPress] Featured product on home page using product&#

  • mattmikulla


    I want to create a featured box on my home page that displays the latest featured product.

    The catch is I want this image to use the single product image (large) and not a catalog image thumbnail.

    Having the excerpt and link to product page would be ideal as well.

    I asked at the support forum and all they told me was beyond the shortcodes available a custom solution is necessary.

    This is a pretty big functionality oversight in my opinion.

    Any ideas on how to achieve this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Mike


    Hi Matt,

    Its not really a functionality oversight because its easily done through a custom loop, if you know what your doing. You do it exactly the same way as you would with posts.

    $my_query = new WP_Query( array(
    'post_status' => 'publish',
    'post_type' => 'product',
    'meta_key' => 'featured',
    'meta_value' => 'yes',
    'posts_per_page => 1
    ) );
    if ($my_query ->have_posts()) : while ($my_query ->have_posts()) : $my_query ->the_post();
    // Output your product here...





    I asked on the support forum and didn’t get any specifics.

    Could you please give me a functioning code example?

    Plugin Author James Koster


    You’d probably get a much better response if you stopped claiming that your own personal requirements not being part of the core plugin are a ‘big oversight’.

    Just my 2c 😛

    I don’t really know what I’m doing so it’s taken me a lot of fiddling to get it going. I finally have my featured products loop working, but only after I changed the 'meta_key' => '_featured'note the underscore there.

    This problem might exist in WooStore as well, but I thought I’d reply to this topic in public in case someone wonders why Mike’s snippet isn’t working. Consider it a 2c refund :-b

    Hi Guys,
    Thanks for sharing your experience. Actually I want to display featured products with thumbnail. Can you please let me know the code for the thumbnainl?

    Thanks in advance.

    pyarasujal there is a featured products widget. I think that you should be able to use that?

    I’m actually trying to use it and I’m having trouble to make it horizontal.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WooCommerce – eCommerce plugin for WordPress] Featured product on home page using product&#’ is closed to new replies.