Parameter for more than 10 posts in WordPress RSS
I need to generate an RSS feed for posts in WordPress that contains more than the usual 10-or-so items. I understand that somewhere I need to do something such as query_posts( 'posts_per_page=-1' );
, but I have absolutely no idea where. (I am new to WordPress development.)
I've looked all up and down my includes/feed-rss2.php, and while I see a lot of stuff that generates my feed, nowhere do I see something that actually queries for a list of posts. In fact, there is no reference to "query" anywhere in the file!
Can you direct me to the appropriate place? Better yet, if there is some parameter I can sti开发者_运维问答ck in the URL when requesting the feed in the first place, that would be great.
Thanks for any direction you can give.
The simplest way to change the number of posts in your feed is to utilize built in options.
Go to the admin Dashboard, then to Settings, then to Reading.
You will be faced with various options, the most important being:
Syndication feeds show the most recent 10 items
That will allow you to specify the number of posts your feed will contain.
Simple, easy and all via the admin panel!
Source: Settings -> Reading via the Wordpress Codex
精彩评论