This is the documentation for LemonStand V1, which has been discontinued. You can learn more and upgrade your store here.

LemonStand Version 1 Has Been Discontinued

This documentation is for LemonStand Version 1. LemonStand is now offered as a cloud-based eCommerce platform.
You can try the new LemonStand and learn about upgrading here.

Implementing RSS channels

The blog module allows you to add two RSS channels to your website - the posts RSS channel and the comments RSS channel. The both channels should be implemented as regular CMS pages.

Creating the posts RSS channel

Create a new page and assign it some name and URL, for example /rss. Paste the following code to the Content field. No other HTML or PHP content is allowed.

01.<?=
02.  Blog_Post::get_rss(
03.    "My blog",
04.    "My news and updates",
05.    site_url('rss'),
06.    site_url('blog/post'),
07.    site_url('blog/category'),
08.    site_url('blog'),
09.    20);
10.?>

The first and second parameters specify the RSS feed name and description.

In the parameters 3-6 you should specify URLs of the RSS channel page (this page), blog post page, blog category page and the blog root page (or archive page). The site_url() function outputs an absolute page URL, including the protocol.

The last parameters specifies how many blog posts to return in the RSS feed.

Creating the comments RSS channel

Create a new page and assign it some name and URL, for example /comments_rss. Paste the following code to the Content field. No other HTML or PHP content is allowed.

01.<?=
02.  Blog_Post::get_comments_rss(
03.    "My blog comments",
04.    "Comments posted by the website visitors",
05.    site_url('comments_rss'),
06.    site_url('blog/post'),
07.    site_url('blog/category'),
08.    site_url('blog'),
09.    20);
10.?>

The parameters of the Blog_Post::get_comments_rss() method are similar to the parameters of the Blog_Post::get_rss() method described above.

Excluding specific categories from RSS channels

You can exclude blog posts belonging to specific categories with passing an array of category identifiers to Blog_Post::get_rss() and Blog_Post::get_comments_rss(). Example: 

Next: Configuring the new comment notifications
Previous: Adding the comment form
Return to Blog module