1.9K
Ever wondering how to add aheadworks’s mangento extenstion– blog list to your home page?
Here’s how to do it.
- Duplicate
app\design\frontend\default\helloseasonal\template\aw_blog\blog.phtml
to
app\design\frontend\default\helloseasonal\template\aw_blog\bloghome.phtml - Edit bloghome.phtml
- Optional: If you want to remove the pagination, remove the following occurrences
<?php echo $this->getChildHtml('aw_blog_comments_toolbar'); ?>
- Optional: If you want to set a a limit to the no of post you want to show in the home page, add
if ($i++ > 5) break;
below foreach…
... <?php foreach ($posts as $post): if ($i++ > 5) break; ?> <div class="postWrapper"> <div class="postTitle">
- Log in to Mangento Admin
- Go to CMS -> Pages and select the home page or the page you want to insert the blog
- Click Content on the side navigation
- At the placement which you want to insert, paste the following codes
{{block type="blog/blog" name="blog" alias="list_blog" template="aw_blog/bloghome.phtml"}}
At the above time of writing, I am using Magento 1.7.0.2 and aheadworks extension 1.2.1.community edition.
You may see the following website for reference: www.lingeriesg.com
6 comments
Thank you very much for your post. It’s really useful.
how about showing the blog posts from specific categories only?
Just tried if ($i++ > 5) break; but it doesn’t work anymore. 🙁
Do you have less than 5 posts?
Hello, thank you for this post, how I can call on left or right column categories, tags, etc?
many thanks
Thank you very much posting this great post.