By default, blogger will only render links to the pages where you can read all entries with given labels:
If you want to expose a feed so that people can subscribe to receive only entries with the given label, here’s what you need to do:
- Go to the Template -> Edit HTML tab on your feed management page:
- Make sure to check “Expand Widget Templates”
- Do a “find” for “data:labels”. That will take you to the markup where the labels are iterated to build the links.
- Inside the div with a
class='widget-content'
, change the code as follows:original:
<b:loop values='data:labels' var='label'> <li> <b:if cond='data:blog.url == data:label.url'> <data:label.name/> <b:else/> <a expr:href='data:label.url'><data:label.name/></a> </b:if> (<data:label.count/>) </li></b:loop>
change to:
<b:loop values='data:labels' var='label'> <li> <link expr:href='data:blog.homepageUrl + "feeds/posts/default/-/" + data:label.name + "?alt=rss"' expr:title='data:label.name + " Feed"' rel='alternate' type='application/rss+xml'/> <a expr:href='data:blog.homepageUrl + "feeds/posts/default/-/" + data:label.name + "?alt=rss"'> <img alt='Subscribe' src='http://www.feedburner.com/fb/images/pub/feed-icon16x16.png' style='vertical-align:middle;border:0'/></a> <b:if cond='data:blog.url == data:label.url'> <data:label.name/> <b:else/> <a expr:href='data:label.url'><data:label.name/></a> </b:if> (<data:label.count/>) </li></b:loop>
Now the rendering is as follows:
Enjoy!
Comments are closed