Add aheadworks’s blog list to magento home page or any CMS page

Ever wondering how to add aheadworks’s mangento extenstion–  blog list to your home page?

Here’s how to do it.

  1. Duplicate
    app\design\frontend\default\helloseasonal\template\aw_blog\blog.phtml
    to
    app\design\frontend\default\helloseasonal\template\aw_blog\bloghome.phtml
  2. Edit bloghome.phtml
  3. Optional: If you want to remove the pagination, remove the following occurrences
    
     <?php echo $this->getChildHtml('aw_blog_comments_toolbar'); ?>
    
  4. 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">
    
  5. Log in to Mangento Admin
  6. Go to CMS -> Pages and select the home page or the page you want to insert the blog
  7. Click Content on the side navigation
  8. 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

Related posts

Magento – Get the list of products which customer wanted to be notify when it is back in stock

catalog_product index does not exist yet. Make sure everything is reindexed.

Unknown filter type [phonetic] for [phonetic]

6 comments

Artur March 21, 2014 - 11:24 pm
Thank you very much for your post. It's really useful.
Bryan Veloso July 14, 2014 - 6:21 pm
how about showing the blog posts from specific categories only?
Bryan Veloso July 14, 2014 - 9:21 pm
Just tried if ($i++ > 5) break; but it doesn't work anymore. :(
Benny July 21, 2014 - 10:40 pm
Do you have less than 5 posts?
BETACOM February 9, 2015 - 2:15 am
Hello, thank you for this post, how I can call on left or right column categories, tags, etc? many thanks
Commerce Pundit April 10, 2015 - 8:47 pm
Thank you very much posting this great post.
Add Comment