How to view Particular Category List in Home Page from Magento?

Go to Magento Cms Page Inside, Put Blow Code then view in your page :
{{block type=”catalog/product_list” category_id=”98″ template=”catalog/product/list.phtml”}}

(OR)

Open in your Magento theme page layout, There you can past below code

<?php     echo $this->getLayout()->createBlock(‘catalog/product_list’)->setCategoryId(98)->setTemplate(‘catalog/product/list.phtml’)->toHtml()     ?>

(OR)

Open Magento Static Block, Create Magento New Static Block, Then Past Below Code :

{{block type=”catalog/product_list” category_id=”98″ template=”catalog/product/list.phtml”}}

Once you placed above code in Magento Staic block inside, You can write below code in your Magento .phtml file inside,

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId(IDENTIFIER)->toHtml() ?>

Here you change "IDENTIFIER" in your Magento Static Block identified number.
Now you refresh your site will show your custom Magento Style Theme.

Thanks,
J.
echo $this->getLayout()->createBlock('catalog/product_list')->setCategoryId(10)->setTemplate('catalog/product/list.phtml')->toHtml()

Comments are closed.

© 2020 Spirituality