简体   繁体   中英

Create an RSS feed for Wordpress using custom meta for custom post types

I'm trying to find information on creating my own custom rss feed for my custom post types in Wordpress.

The way I have set up my custom post types mean that the 'title' can be duplicated (although I fixed this for tags before anyone mentions it!).

Anyway, what I'm looking for is to display my title and custom meta for each of the feed's items but I just can't find any info.

Can anyone give me any ideas?

Cheers

I actually found the answer quite easily...

  1. Create a new template (ie feeds/my-new-feed.php)
  2. Copy the code from wp-includes/feed-rss2.php into this new template
  3. Do whatever it is you need to do to display whatever you want to.
  4. Create a new page which uses that template

Hope this helps someone else.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM