Custom fields in WordPress RSS feed

前端 未结 4 674
死守一世寂寞
死守一世寂寞 2021-01-21 08:55

I have 2 custom fields in my WordPress system when creating new posts. One is called homethumb (is the title of an image) and another called description.

I

4条回答
  •  独厮守ぢ
    2021-01-21 09:18

    You also have

    do_action('rss_item')
    

    that runs in the loop for every item in the RSS feed. Hook in to that and output anything extra you need in to the feed item.

    To show the excerpt instead of the entire article, go to "reading" in Settings section of your admin menu and half way through the options there's a setting to use excerpts instead of full text.

    No plugins required. Just a little custom programming.

提交回复
热议问题