Custom fields in WordPress RSS feed

2019-02-25 06:56发布

问题:

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 would like to edit the RSS feed so it shows the image and the description rather than the complete post.

But I don't know how to do this. I would like to fetch that RSS with simple pie to integrate it on another website (sort of auto-submit system).

回答1:

Custom fields for Feeds Wordpress plugin

This puts images or videos into your feeds through the use of custom fields. You can alter the custom field Keys and what is displayed.

Update 11/27/2015: The plugin is old, but the site says it still works



回答2:

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.



回答3:

I found some tutorials on how to add things to your rss reader, so I fixed this.

it's in french -> http://www.webinventif.fr/wordpress-ajouter-du-contenu-dans-son-flux/



回答4:

Here is another option if you want to display anything other than images and videos in your feed: http://wordpress.org/extend/plugins/rss-custom-fields/

All of your custom fields will now be displayed in your feed.

Further options to be able to select which custom fields display in a feed will be available in subsequent releases of the plugin!



标签: wordpress rss