Show products of a particular category on Homepage

Is there any possibility to show particular category's products on the homepage using category ID? if yes, then how could this be possible?


  • TradingboTradingbo Member Posts: 36

    I'd like to read an example of this code being expressed within a rain/twig snippet as well.


  • MilesbdMilesbd Moderator, Lightspeed Staff Posts: 25 moderator

    Hi and thanks for the question!

    It is not possible to display the products from a chosen category directly within the template editor.

    While you are able to add featured categories (under Design > Featured Categories), the products within that category are not present as data available to the homepage.

    You can use the Featured Products option (under Design > Featured Products), to display certain products on your homepage.

    Lastly, while not directly possible to code directly in the template in twig/rain, you could call the products and the product data using an Ajax request to the particular category's products using javascript, and render the content in that manner (see 3 g. AJAX and JSON - and take special note of the suggested amount of requests per page load)

Sign In or Register to comment.