List some products based on categories on the homepage including pagination

This topic has 5 replies, 2 voices, and was last updated 5 years, 8 months ago ago by Olga Barlow

  • Avatar: r1nk
    r1nk
    Participant
    July 31, 2018 at 10:55

    Hello, if you click the website homepage, you will see all the recent products in max of 28 including the pagination.

    Is there any shortcode or simple code customization to display list of products based on NEW category below the recent products? And the products also show max of 28 including the pagination.

    4 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    July 31, 2018 at 16:14

    Hello,

    What element did you use to display products there?

    Regards

    Avatar: r1nk
    r1nk
    Participant
    July 31, 2018 at 16:36

    Not sure what element you are asking. But, what I sure is the product loop with the pagination is calling from woopress/woocommerce/archive-product.php

    Inside there, this code display the recent products loop with the pagination.

    `<?php woocommerce_product_loop_start(); ?>

    <?php woocommerce_product_subcategories(); ?>

    <?php while ( have_posts() ) : the_post(); ?>

    <?php wc_get_template_part( ‘content’, ‘product’ ); ?>

    <?php endwhile; // end of the loop. ?>

    <?php woocommerce_product_loop_end(); ?>
    </div>

    <?php
    /**
    * woocommerce_after_shop_loop hook
    *
    * @hooked woocommerce_pagination – 10
    */
    do_action( ‘woocommerce_after_shop_loop’ );
    ?>

    So, can I adding and alter something below those codes, to display product loop from other specific product category?

    Please, contact administrator
    for this information.
    Avatar: r1nk
    r1nk
    Participant
    August 1, 2018 at 03:32

    Owh I just understand your question. You mean the element from the visual composer? I don’t use any. I just set the homepage to a blank new page, and it’s auto fill the latest products.

    I tried open the homepage and go into visual composer and add new element, but nothing show. I can give you the wp-admin access if you want.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    August 1, 2018 at 10:13

    Hello,

    Yes, we meant the visual composer element. The simple page does not show the products by default. Very likely you set the shop page as the home page, shop page displays all the products and there is no setting to show products from the specific category only. You can change the sorting order to show the recent products first (Appearance > Customize > WooCommerce > Product Catalog > Default product sorting).

    Maybe it’s possible to show products based on category there via additional customization. Submit customization request here because support does not include customization service.

    Regards

  • Viewing 5 results - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.