WiscWeb - Embedding RSS feeds
These instructions can be used to place an RSS feed into a UW Theme page in WordPress. RSS Feeds are a way of delivering external news content to your website in a way that keeps them regularly updated. The UW WordPress Theme can use RSS feeds, however it does require you to use a 'shortcode' to import that into a text block on a page.
Steps
- Navigate to the page you'd like to add your RSS Feed to.
- Add in a Text Block by clicking on the "Add Page Element" button and selecting "Text Block" from the list.
- In the Text Block, either in Visual or Text mode, paste in the following code:
[uw-rss-feed url="https://urlgoeshere.com" title="Title of RSS Feed" description="Description of RSS Feed" more-link="https://urlgoeshere.com" max-posts="x"]
- Change the URL text (between the two quotation marks) to be the URL of the RSS Feed. This URL will likely end in .rss or something similar.
- Change the Title text (between the two quotation marks) to the title that you want displayed above the RSS feed
- Change the Description text (between the two quotation marks) to a short description of what the RSS feed is and what kind of information it is pulling in.
- Change the More Link text (between the two quotation marks) to the URL of the main webpage where the feed can be found.
- Change the max-posts text (between the two quotation marks) to the number of articles you would like to display. We recommend no more than 10, but please note that the max-posts option has a maximum value of 15.
- Update your page when ready.
Considerations
- In some cases, when using a site that doesn't have a traditional .rss URL, you may need to add a /feed/ to the end of a URL.
Adding a feed from UW-Madison news
- When you are trying to use a news feed from UW-Madison News, you would first find the category or tag that you want to create a feed for.
- Do this by clicking on a menu Category option, such as Science & Technology.
- Once you have that page loaded (e.g., http://news.wisc.edu/science-technology/) type in the word feed after the slash at the end of the URL (e.g., http://news.wisc.edu/science-technology/feed/) and hit enter.
- Note: You could also do the same for a tag (e.g., http://news.wisc.edu/tag/science/feed/)
- This will show some code on the screen. Copy the URL value in the browser.
- This is the URL that you will use for a feed from UW-Madison News to display on your page, using the steps above.