WordPress makes it easy to publish content in any number of categories, with any number of tags, and with any type of custom post format. So for example, in addition to full articles, you could also offer screencasts, links, side posts, tweets, and all sorts of other peripheral content. Complementary material may work great for visitors surfing around your site, but including all of that extra stuff in your RSS feed dilutes the potency of your main articles. The idea here is that your visitors will subscribe to the more focused content.

In this post, we create a custom, "articles-only" feed for visitors who want to subscribe to the main content only, without all the side stuff. The technique is actually pretty flexible, and works great to create just about any type of custom WordPress feed content. It's pretty easy to do, requiring a whopping two steps to make it happen..

Step 1: Create the custom page template

Go to your theme directory and create a new PHP file named article-feed.php. Then add the following code (don't worry it's actually not that bad):

This is basically just a typical WordPress feed template, but with some extra query action to make it do what we want. In the first few lines of code, we specify how many posts to display, which categories to include, and whether to display full posts or excerpts:

Using this default code, the custom feed will show 10 posts from category 3. And with $more set to 1, the full article will be included in the feed. This is where you customize your new feed to include whatever you want. So for example, if we post articles in three different categories, say with IDs of 1, 2, and 3, we would modify our code to look like this:

The query_posts function is quite flexible and provides all of the parameters needed to set up just about any customized feed content. You can exclude/include categories, display specific types of posts, change the number of posts displayed, and so much more. For a full list of options, check out query_posts at the WordPress Codex.

Step 2: Create the custom Page in the WP Admin

Once you have the custom Page Template uploaded to your server, log into the WordPress Admin and visit the "Add New Page" screen (Pages > Add New). Create a new page named "Articles-Only Feed" (or whatever), and select the newly added "articles" page template from the drop-down menu: While you're there in the Admin creating this new custom-feed page, take a moment to be mindful of the feed URL and title, which may be set to whatever works best: Once everything is ready, finish it up by publishing the page to your site. Then check that your new feed is working by visiting the URL of the new page you just created in the WP Admin. Here at DigWP.com, our articles-only feed is available at https://digwp.com/articles/.

Wrap-up + additional resources

In addition to the easy-breezy two-step custom-feed tutorial in this post, here are some additional resources that are sort of related to this general topic:
[null, null, null, null, null, null, null, {"document_url": "https://digwp.com/2011/08/custom-feeds/", "unformatted_src": "/wp-content/blog-images/theme-data.jpg", "src": "https://digwp.com/wp-content/blog-images/theme-data.jpg", "formatted_filename": "theme data", "alt_text": "Displaying Theme Data with WordPress", "rendered_width": 150, "rendered_height": 150}, null, {"document_url": "https://digwp.com/2011/08/custom-feeds/", "unformatted_src": "/wp-content/blog-images/feed-columns-wordpress.jpg", "src": "https://digwp.com/wp-content/blog-images/feed-columns-wordpress.jpg", "formatted_filename": "feed columns wordpress", "alt_text": "Import Feed, Display in Multiple Columns", "rendered_width": 150, "rendered_height": 150}, null, {"document_url": "https://digwp.com/2011/08/custom-feeds/", "unformatted_src": "/wp-content/blog-images/reset-loop.jpg", "src": "https://digwp.com/wp-content/blog-images/reset-loop.jpg", "formatted_filename": "reset loop", "alt_text": "3 Ways to Reset the WordPress Loop", "rendered_width": 150, "rendered_height": 150}, null, {"document_url": "https://digwp.com/2011/08/custom-feeds/", "unformatted_src": "/wp-content/blog-images/thumbnails-feeds.jpg", "src": "https://digwp.com/wp-content/blog-images/thumbnails-feeds.jpg", "formatted_filename": "thumbnails feeds", "alt_text": "Show Post Thumbnails in Feeds", "rendered_width": 150, "rendered_height": 150}, null, {"document_url": "https://digwp.com/2011/08/custom-feeds/", "unformatted_src": "/wp-content/themes/wp/img/book.jpg", "src": "https://digwp.com/wp-content/themes/wp/img/book.jpg", "formatted_filename": "book", "alt_text": "Digging Into WordPress Version 4.9", "rendered_width": 272, "rendered_height": 220}, null, null, {"document_url": "https://digwp.com/2011/08/custom-feeds/", "unformatted_src": "/wp-content/themes/wp/img/side/wp-themes.jpg", "src": "https://digwp.com/wp-content/themes/wp/img/side/wp-themes.jpg", "formatted_filename": "wp themes", "alt_text": "WordPress Themes In Depth", "rendered_width": 272, "rendered_height": 110}, null, null, {"document_url": "https://digwp.com/2011/08/custom-feeds/", "unformatted_src": "/wp-content/themes/wp/img/side/bbq-pro.jpg", "src": "https://digwp.com/wp-content/themes/wp/img/side/bbq-pro.jpg", "formatted_filename": "bbq pro", "alt_text": "BBQ Pro", "rendered_width": 272, "rendered_height": 110}, null, {"document_url": "https://digwp.com/2011/08/custom-feeds/", "unformatted_src": "/wp-content/themes/wp/img/side/wp-tao.jpg", "src": "https://digwp.com/wp-content/themes/wp/img/side/wp-tao.jpg", "formatted_filename": "wp tao", "alt_text": "The Tao of WordPress", "rendered_width": 272, "rendered_height": 110}, null, null, {"document_url": "https://digwp.com/2011/08/custom-feeds/", "unformatted_src": "/wp-content/themes/wp/img/side/usp-pro.jpg", "src": "https://digwp.com/wp-content/themes/wp/img/side/usp-pro.jpg", "formatted_filename": "usp pro", "alt_text": "USP Pro", "rendered_width": 272, "rendered_height": 110}, null, null, {"document_url": "https://digwp.com/2011/08/custom-feeds/", "unformatted_src": "/wp-content/themes/wp/img/side/htaccess.jpg", "src": "https://digwp.com/wp-content/themes/wp/img/side/htaccess.jpg", "formatted_filename": "htaccess", "alt_text": ".htaccess made easy", "rendered_width": 272, "rendered_height": 110}, null]