Daniel Cazzulino's Blog

Go Back to
kzu′s Latest post

Blogger: how to provide label/tag feeds

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:

  1. Go to the Template -> Edit HTML tab on your feed management page:


  2. Make sure to check “Expand Widget Templates”
  3. Do a “find” for “data:labels”. That will take you to the markup where the labels are iterated to build the links.
  4. Inside the div with a class='widget-content', change the code as follows:


    <b:loop values='data:labels' var='label'>  <li>    <b:if cond='data:blog.url == data:label.url'>      <>    <b:else/>      <a expr:href='data:label.url'><></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/-/" + + "?alt=rss"' expr:title=' + " Feed"' rel='alternate' type='application/rss+xml'/>  <a expr:href='data:blog.homepageUrl + "feeds/posts/default/-/" + + "?alt=rss"'>    <img alt='Subscribe' src='' style='vertical-align:middle;border:0'/></a>    <b:if cond='data:blog.url == data:label.url'>      <>    <b:else/>      <a expr:href='data:label.url'><></a>    </b:if>    (<data:label.count/>)  </li></b:loop> 

Now the rendering is as follows: