Wordpress RSS feed with custom description?

邮差的信 提交于 2019-12-24 09:13:53

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!