Your sites Log in Sign up Menu

Tags as RSS categories?

Is it possible to modify the RSS feed so that an entry's tags will be declared as categories in the feed? I'm asking because I'm switching to Feedmail for email subscriptions and they have a feature that lets users subscribe to or exclude specific categories. Would be great if I could take advantage of that feature.


16 days ago, 5 replies   developers   rss   tags   Improve this question

I followed Oatmeal's way of doing it here

Answered 17 days ago · Improve this answer

Thank you, that's useful, but not quite what I'm looking for. What I would like is that the tags of an entry will be declared in the feed.rss file as categories, as in:

<category>tag1</category>

<category>tag2</category>

and so on. As I understand it, that would take advantage of a Feedmail feature that would let specifically my readers who subscribe via email filter based on tags.

Answered 17 days ago · Improve this answer

I just edited the rss template and added the following lines inside the <item> tag:

{{#tags.length}}{{#tags}}
      <category>{{name}}</category>
{{/tags}}{{/tags.length}}

Although, now I want to check if it's a good standard to have multiple categories for one item on RSS feed.

How are you planing to use that?

Answered 16 days ago · Improve this answer

Thank you, this is working!

Although, now I want to check if it's a good standard to have multiple categories for one item on RSS feed.

I wondered about that too. Based on checking a couple of feeds I subscribe to, it certainly seems to be a common practice to have multiple categories though.

How are you planing to use that?

It's just to take advantage of a feature that Feedmail (an RSS-to-email service) has. When users subscribe to my blog via email, this let's them exclude update for tags they don't want. E.g., I publish in both English and German, and this will let non-German speakers filter out German posts. Or posts about topics they're not interested in. And I imagine it might also be useful for certain RSS readers that let you filter based on category.

Answered 16 days ago · Improve this answer

Ah, yes, you did mention Feedmail in your question, that sounds fun!

Answered 16 days ago · Improve this answer