I’m not sure how to word my question and I have been searching all day, to no avail.
I am looking for a method to create two versions of my RSS feeds, one with the full content and one with only the excerpt.
Mainly, I want to do this for the “Author” feeds. I would like two feeds created for each Author. One with the full content and one with the excerpt. If nothing else, I would like the author RSS feed to only have excerpts, but the main website RSS feed must ALWAYS be a full content feed.
The reason? The website in question is a sports website. I want to offer the RSS in full content for those who want it, but I also automatically post my own articles on my personal website (a few others do as well). When the article is posted to my own website, I want to only include the excerpt, with a link to the full original article.
I do not care the method used, whether code or plugin.
UPDATE
I have been working to try to get the methods described by Michael Ecklund and Ian Dunn to work. I have not been able to get either to work. Both methods still show the complete article in the RSS feed and not the excerpt.
I’m not sure if it makes a difference, but I just remembered I use the Advanced Excerpt plugin to manage the excerpts on my website. I have not tried disabling this plugin, as it controls the homepage, category pages, tags pages, author pages and more.
My approach would be to:
For each article in a feed, show...
option toFull Text
so that, by default, feeds will include the entire post.http://example.com/author/username/feed?format=excerpt
. Make sure you don’t use a reserved term for the parameter name.http://example.com/author/username/feed
.Here’s some code that does that, using
format
as the parameter name. You can use any parameter name you want, as long as you update each part of the code that references it. Put the code inside a functionality plugin.To avoid a conflict with the Advanced Excerpt plugin, add this code to the functionality plugin as well. It will disable Advanced Excerpt’s functionality on feed URLs, but leave it in tact for all other pages.
Plugin
Here’s a tiny plugin that allows you to override the Full-Text/Summary feed option, through a simple GET parameter:
It respects the current settings, without the GET parameter. I use the underscore to avoid possible name collisions, but otherwise I took on the challenge to keep the plugin very simple & short 😉 We could easily use the
$tag
argument, to constrain this to rss2 or atom, if needed. Remember to use cache busting parameters when testing this in your browser.Usage Examples
You would access a short version with excerpt on the address:
http://www.dicazine.com.br/author/admin/feed?version=short
The less the better:
There is actually quite an easy approach to accomplish this particular task.
METHOD ONE
Follow these steps to easily create a custom RSS feed in your WordPress website:
theme directory.
You can now access your Custom Feed at: your-domain.com/custom-feed/user-slug/
Credits go to Joost de Valk for publishing an excellent article. However, I slightly modified his code from the original article.
You could place this in your current active WordPress theme functions.php file:
Now, I’m not saying this solution is practical, but it works.
Alternatively, you can possibly make some usage from this class I made which uses
add_feed();
METHOD TWO
Directions for using this class method within your theme. (Note: This class could easily be integrated into a plugin.)
Name it: “inc”. (Directory structure should look like:
./wp-content/themes/your_theme/inc/)
block in this answer) in the file. Save it as custom-feeds.php
effect.
You can now access your Custom Feed at: your-domain.com/feed/custom-user-slug/
Note: you can change the prefix “custom-” to anything you want. Just configure the settings in the class constructor.
Note: I don’t know how well it would perform on large scale websites. Although, the way I have setup this class, allows for easy manipulation. You could use this same class for generating feeds of a custom post type, or custom taxonomy as well. My Custom Feeds class has been tested on WordPress 3.4.1 and works correctly.
If you wanted to use it the way I have it currently setup, all you would need to do is configure the feed settings in the class constructor.