问题
Is there a nice and simple way to add a filter to the wordpress RSS feed functions?
I want to insert some custom text into the <description>
tag of my RSS2 feed and the <summary>
tag of my Atom feed. Is there any easy way to do that?
I don't have templates for my feeds in my theme (like wp-rss2.php or wp-atom.php). I've just added the normal
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
to my <head>
Any idea how I can influence the description and summary of my feeds?
回答1:
There's several options depending on your comfort/experience level:
- Install a plugin like Feed Wrangler or Ozh Better Feed
- Use a 3rd party service like Feedburner
- Hook into the feed using various PHP functions
- Or edit the feed output
来源:https://stackoverflow.com/questions/5050073/wordpress-rss-feed-with-custom-description