Configure WordPress RSS Feeds on your Magento store

This article applies to 3-1n-1 Magento and WordPress Matching theme only.

We have added extra feature to WordPress feed on Magento for v1.4.1.0 compatible themes, now you can show two different WordPress feeds.

In our demo sites, we displayed a Recent Entries on the homepage/CMS page which shows the latest blog post, then in the Product Listing and Product View pages we showed a WordPress category, e.g. Popular Articles.

Configure Recent Entries WordPress feed

In the template/callouts/recent_entries.phtml, around line 26 change the feed address to yours:

http://www.yoursite/blog/wp-rss2.php

If you use FeedBurner, your feed url is something like this:

http://www.yoursite/myBlogFeed

Show a feed for WordPress Category or Tag name

In the template/callouts/wpcategory.phtml, around line #26 change the feed address to your desired WordPress category. See the feed examples of the Categories and Tags here.

Note: make sure the Category or Tag that you wish to syndicate is already existed in your WordPress blog or it will throw a PHP error in your Magento store.

Other configurations

1. Show more than 1 (or 2) entries in line #36. Default is 1.

<?php if ($newscount > 1) break; ?>

2. Change the length of the content in line #39. Default is 80 words.

<?php $limit=80; ?>

3. Display a different date format in line #45

Default format is ‘M d, Y’ = Feb 22, 2010

Other date formats:

  • ‘D, M d, Y’ = Thu, Jan 01, 2010
  • ‘D, M d’ = Mon, Feb 22
  • ‘l, F jS, Y’ = Monday, June 21st, 2010
  • ‘D, F jS, Y’ = Mon, June 21st, 2010
  • ‘j/n/y’ = 21/6/10 (day/month/year)
  • ‘n/j/Y’ = 6/21/2010 (month/day/year)

Learn more about Date format from WordPress Codex.

Tags:

Comments are closed.