Documentation:UBC Content Management System/CLF Theme/RSS feed

From UBC Wiki
< Documentation:UBC Content Management System‎ | CLF Theme
Revision as of 16:29, 21 January 2014 by Loongchan (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Welcome to the support documentation for the
UBC CMS Service.

UBC Content Management System

UBC Collab Theme

UBC Collab Theme Overview
Theme Options Index
CLF Options
Layout Options
Display Options
Global Theme Options

Dashboard Overview
Pages and Posts
Adding Users

RSS Feeds
Going Live

Complete Topic Index
PDF Wiki Book Version

RSS Feeds

You can pull an RSS feed by using the RSS Widget as described in the section: How to embed a news feed from RSS; however, this method will only allow you to place an RSS feed in the widget area of your site and the feed will be visible throughout the entire site (unless it's on the frontpage). This might not be what you want. No worries! You can use the feed shortcode to place an RSS feed exactly where you want it, on any page of your liking. You can either use the Section widget and type the feed shortcode in the Section widget, like so: [feed].

The shortcode has a number of parameter values:

  1. view=
    • list
    • rsswidget
    • blog
    • archive (does need excerpt_length to be set)
    • cal or calendar
    • events
    • listevents
    • upcoming (does not work with month parameter on RSS feed)
    • timeline
    • flickr (Flickr feeds are limited to the latest 20 images and the gallery will not show more than 20 images no matter what you set the parameter num to)
  2. num - number of items that you want to display : num=5 will list the latest 5 items
  3. url - the url of the feed or site
  4. target= - sets whether links open up in the same or new window
    • '_self' - links open in the same window (default)
    • '_blank' - links open up in a new window
  5. date_format - what the date format should look like default 'M d, Y' - look at PHP Date format for more info
  6. empty - what it should say if the feed is empty
  7. excerpt_length - the number of character it should display
  8. time_zone - a string that is documented here - we are setting the default timezone with the function (shouldn't really need to define this)
  9. show_author - 'true' or 'false' - false if left out only applies to view = rsswidget
  10. show_date - 'true', 'updated' or 'false' - false if left out only applies to view = rsswidget - 'updated' mean that the dates are being sorted by updated xml filed as opposed to the published date
  11. order_by_date - if set to 0, it will use the order given by the rss feed, if set to 1 (also default value), it will try to re-order posts by date.

[feed url=""]

See example below:


Specify on which page you would like this feed to be displayed.


Please see the example of the outcome below.


Alternatively, you can place RSS shortcode in the main content area of the page. For example,


Please see the example of the outcome below.


For example, you can do something like the following:


The shortcode above pulls the list of events from UBC Events Calendar and displays the description of the event below the link.


Please see below how this shortcode works on the webpage.


Here is another shortcode example using parameter "list" and the outcome on the webpage:


Here is another example of the shortcode being used! [feed url='' view='rsswidget' show_author='true' show_date=updated date_format='l, M d, Y h:i:sA' time_zone="America/Vancouver"]

See Also