• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to add products from various categories on the homepage?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to add products from various categories on the homepage?

This topic is: not resolved

Tagged: WooCommerce

  • This topic has 2 replies, 3 voices, and was last updated 2 years, 4 months ago by Brad Dalton.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • September 29, 2020 at 8:21 am #501244
    chikamiku
    Participant

    Hi There, Could anyone please let me know how to add woo-commerce products from various categories on the homepage? For example, four products from menswear, another 8 from womenswear, and still another set of 12 products for the Kids category. Can we achieve it by using Gutenberg?

    I am thinking of making one such website. Mai-lifestyle pro theme seems to do just that for post categories. but, i want to do it for woocommerce products.

    Thanks and regards

    September 29, 2020 at 9:53 am #501250
    Anita
    Keymaster

    You did no provide a link to your website.


    Love coffee, chocolate and my Bella!

    September 30, 2020 at 11:54 pm #501276
    Brad Dalton
    Participant

    It depends on your front page setup.

    There are at least 3 ways :

    1. If using blocks, you can use a WooCommerce block.

    2. If using widgets, you can use a WC widget.

    3. If using a standard loop, you can add support for your WC Product CPT like this in your child themes functions.php file

    add_action( 'pre_get_posts', 'add_custom_post_type_to_query' );
    function add_custom_post_type_to_query( $query ) {
        if ( $query->is_home() && $query->is_main_query() ) {
            $query->set( 'post_type', array('post', 'product' ) );
        }
    }
    

    Get Help – Book Consultation.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble