How to Show Magento Particular Categorie Image in Magento?

<?php
$cat_id = 8; // set desired category id
$category = Mage::getModel('catalog/category')->load($cat_id);
$products = $category->getProductCollection()->
addCategoryFilter($category)->addAttributeToSelect('*');
?>
<?php foreach ( $products as $_product ): ?>
<a href="<?php echo $_product->getProductUrl() ?>">
<img src="<?php echo $this->helper('catalog/image')->
init($_product, 'small_image')->resize(135, 135); ?>"
width="135" height="135" title="<?php echo $_product->getName() ?>"
alt="<?php echo $_product->getName() ?>" /></a>
<?php endforeach; ?>

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()

How Create Categorie Resent Post?

Display 5 latest posts in each category in WordPress


http://blogsessive.com/blogging-tools/latest-posts-by-category-archive/

Display 10 recent post titles on homepage

http://codex.wordpress.org/Function_Reference/in_category
<strong>http://codex.wordpress.org/Function_Reference/get_the_category</strong>
<div>LATEST ARTICLES</div>
$args = array(‘orderby’ => ‘name’, ‘numberposts’ =>3, ‘category’ => 3, ‘order’=> ‘ASC’, ‘orderby’ => ‘title’ );
$postslist = get_posts( $args );
foreach ($postslist as $post) :  setup_postdata($post); ?>
<div>
<div>ID, ‘thumbnail’);
echo get_the_post_thumbnail($page->ID, ‘full’);
?></div>
$category = get_the_category();

$category_id = get_cat_ID(‘3′);
// Get the URL of this category
$category_link = get_category_link($category_id);
//echo $category[3]->cat_name; ?>
<h4>cat_name.'”>’.$category[3]->cat_name.”; ?></h4>
</div>
that’s all :)

© 2020 Spirituality