WordPress.org

Ready to get started?Download WordPress

Forums

WordPress RSS Feed Limit By Days (2 posts)

  1. LewisSellers
    Member
    Posted 1 year ago #

    Hi There,

    I've got a WordPress blog that I'm doing some work on...

    What we want to do is get it so that the RSS feed built into wordpress, to only include posts from the last 7 days. Is this possible?

    I imagine I'll probably have to modify some of the existing code, but I'm not quite sure where to start with this one!

    Any help would be appreciated.

    Regards,
    Lewis

  2. bcworkz
    Member
    Posted 1 year ago #

    To alter feeds, you would normally start with Customizing Feeds. But you probably can use the default template, you just need to change the query that feeds the loop on the feed template. Take a look at Class_Reference/WP_Query#Time_Parameters. The default feed limits the posts to a number set in the admin panels. To disable this count, Function_Reference/query_posts#Syndication_Feeds might help.

Topic Closed

This topic has been closed to new replies.

About this Topic