I added recently viewed product block in home page it's fetching properly recent view product if i used same code in some other page it working fine. I don't know what is the problem can you please suggest
<?php if ($_products = $this->getRecentlyViewedProducts()): ?>
<div class="block block-list block-viewed">
<div class="tittle_block">
<div class="tittle">Recently Viewed Product</div>
</div>
<div class="block-content slideshow-container"> <!-- Added a class for parent container-->
<ol id="recently-viewed-items"> <!-- Added a class for container-->
<?php foreach ($_products as $_item): ?>
<li class="item">
<a href="<?php echo $this->getProductUrl($_item) ?>">
<span class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(185, 185)->setWatermarkSize('30x10'); ?>" width="185" height="185" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></span>
</a>
<div class="product-details">
<p class="product-name">
<a href="<?php echo $this->getProductUrl($_item) ?>">
<?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName() , 'name') ?>
</a>
</p>
</div>
<?php echo $this->getPriceHtml($_item, true, '-new') ?>
</li>
<?php endforeach; ?>
</ol>
<script type="text/javascript">decorateList('recently-viewed-items');</script>
</div>
</div>
<?php endif; ?>