Filter syndicated posts by date or age with FWP+: Limit Posts By Date(posted on 08 November 2010)

I’m happy to announce the public release of FWP+: Limit Posts By Date version 2010.0929!

FWP+: Limit Posts By Date is an add-on module for FeedWordPress that allows you to automatically filter incoming posts based on the date, age, or total number of posts, allowing you to set limits so that posts which are too old will not be syndicated.

To install the add-on, simply download the installation package for the latest version, unzip the contents, and drop the module into your wp-content/plugins directory. Then activate the add-on like any other WordPress plugin. (For more on installing and managing WordPress plugins, see WordPress: Managing Plugins.)

Once the add-on is installed and activated, you can set up your filtering by going to Syndication –> Feeds & Updates, where you should find the new Limit posts by date settings box.

This box provides two means for filtering posts by their date or age.

First, you can choose to create a simple filter based on a fixed date or a span of time. To set up such a filter, use the Date filter setting, providing it with a cut-off date, or else with a timespan (so that FWP will, for example, filter out — will not syndicate — any posts older than November 1, 2010; or so that it will, for example, not syndicate any posts more than 5 days old at the time FeedWordPress first encounters the post on its source feed).

Second, you can choose to limit the number of new items that FeedWordPress will syndicate at any one time — so that, for example, FWP will only syndicate up to 5 of the most recent new items, rather than all new items, when it finds several new items on a feed.

Note that this add-on only filters out posts that exceed the limits you set at the time FeedWordPress first encounters them on their source feeds. If you set a filter on posts from more than 5 days ago, the filter will prevent any more items more than 5 days old from being syndicated in the first place. But it will not go back and retroactively drop existing syndicated posts that are now more than 5 days old.

Many thanks to the folks at and for their generous support of the FeedWordPress project and the experimental development of this add-on. Their gifts and hands-on help with beta testing were extremely helpful in making it possible for me to devote the time and labor necessary to develop this add-on module.

Download and enjoy! As always, if you have any questions, comments, concerns, feedback, applause, brickbats, &c., let me know in the comments section.


20 replies to Filter syndicated posts by date or age with FWP+: Limit Posts By Date | Use a feed to Follow replies to this article | TrackBack URI

  1. Marc says:

    “But it will not go back and retroactively drop existing syndicated posts that are now more than 5 days old.”

    Is there a way you can have this enabled? I’ll even pay for the customization of this. I was thinking more in line with existing posts that are 6 months or older and not “5 days”.

    By the way, I had left you a voicemail message but have not received a callback yet.

    Thanks in advance if you’re reading this.


  2. Carissa Crimson says:

    This is a great plugin! I’ve been using my own filter built on your API that was doing something similar, but it was never 100%. Unfortunately I can’t get this plugin to work. After installing it on my live website, I see the “Limit posts by Date” section in the Feeds and Updates, but there are no settings (it’s just an empty box).

    I’ve disabled all addons except feedwordpress and this addon with the same result. I also installed a new fresh copy of wp 3.0.1, feedwordpress, and this addon with the same result: Empty “Limit posts by date” settings box.

  3. Carissa Crimson says:

    No matter what I do, the Limit Posts by Date settings box is empty. Even on a fresh wordpress install with only FWP and this addon.

    I’m sifting through the addon code to see if I can figure out why the settings aren’t displaying, but any help would be appreciated!

  4. Kyle says:

    Dear Rad Geek,

    I’m getting this in the “Syndication/Feeds & Updates” section:

    Fatal error: Call to undefined method FeedWordPressFeedsPage::setting() in /home/justflig/public_html/blog/wp-content/plugins/fwp-limit-posts-by-date/fwp-limit-posts-by-date.php on line 173

    Any idea how to fix?


    • Carissa Crimson says:

      Kyle: You were able to help me find the problem with the code that was causing the settings not to display. You can use the plugin editor to locate the following line of code (line 173) $val = $page->setting( “post number filter”, 5 );

      and replace with:

      $val = getoption(‘feedwordpresspostnumberfilter’, 5);

      This will at least get rid of the error and allow you to change the settings until Charles has a chance to look at it.

  5. Carissa Crimson says:

    Marc: I use another plugin that accomplishes what you are looking to do. It’s called Auto Delete Posts and can be found here

    I’m curious if anyone has been able to get this plugin to work.

  6. Zoli Erdos says:

    Getting error on three different blogs where I tried to install this plugin:

    Fatal error: Call to undefined method FeedWordPressFeedsPage::setting() in /…path../wp-content/plugins/fwp-limit-posts-by-date/fwp-limit-posts-by-date.php on line 173

  7. kalinga says:

    confirm the error

    Fatal error: Call to undefined method FeedWordPressFeedsPage::setting() in /nfs/c03/h01/mnt/86281/domains/ on line 173

    wordpress 3.0.1 & feedwordpress 2010.0905 Plugin – 2010.0929

    PHP – 5.2.14 on Linux (Debian)

    $val = $page->setting( “post number filter”, 5 );

    and replace with:

    $val = getoption(’feedwordpresspostnumberfilter’, 5);

    does not fix the issue, it just generate another.

  8. Danny says:

    I’m getting the same problem – when the LimitPostsbyDate plugin is active, the feeds admin page only loads until the point that it displays the box header and then it seems to stop. The result is this in teh page’s HTML:

    <div id="feedwordpress_fwplimitpostsbydate_box"          ...
    <div class="inside">

    Then it stops loading.

    Any ideas?



  9. Danny says:

    Oh – just ignore me. I’m daftly a version behind. Will try the new one…

    Thanks, as ever,


  10. Danny says:

    Nope. I’m not crazy, just not concentrating very hard.

    The problem still exists as above, and while the new LimitPostsBySize plugin works perfectly, the LimitbyDate just loads to a point and then stops.

    Any help most appreciated.



  11. Sven says:

    Unfortunately I get this error the Kyle gets displayed:

    Fatal error: Call to undefined method feed WordPress feed page:: setting () in / www/htdocs/Datei001/blog/wp-content/plugins/fwp-limit-posts-by-date/fwp-limit-posts-by-date.php on line 173

    @ carina Also replacing the line 173 in: $ val = GetOption (‘feed WordPress post number filter’, 5); Does not work for me! Unfortunately, shame.

    If one has found the solution please tell how to do it so you can use the plugin. Thanks for the help and greetings from Germany.

  12. Ian says:

    Just updated my wordpress and plugins and now my site is getting flooded with old posts and I can’t get this plugin to work. I’m also get the error on line 173 and carissa’s fix didn’t help.

  13. Ian says:

    Does anyone know if it is possible to just hardcode the settings in the plugin’s files since i can’t see the options?

  14. Andy says:


    Fix on line 173 didn’t work for me – but looks like some typos in the code given – replace line 173 with the following:

    $val = get_option('feedwordpress_post_number_filter', 5);

    Worked for me :)

  15. Edwin says:

    The above didn’t work for me either.

  16. Ivan says:

    Awesome!! just what I was looking for.. keep up the good work and I’ll gladly donate to u in the coming future..

    btw, the fix was actually a missing underscore typo from earlier post. This worked for me

    $val = get_option(‘feedwordpresspostnumberfilter’, 5);

    Note, feedwordpress will still say something like ’10 new posts were syndicated..’ when you manually update, but i manage to get the number of posts i set.

  17. Eric says:


    I have LPBD set to 2 days ago and only syndicate 3 most recent posts. When I update my feed, it says it syndicated more than posts (sometimes 10-15 or so). When I click on posts, I don’t see all the syndicated posts. In the wpposts table of the database, the posts are all there and tagged “syndicatedskipped”, which in your plugin says “This is a special post type we’ll use to hide posts from deactivated authors”. I’m not sure what deactivated authors are. It’s clear that it hides the posts from display, but why does it do that?

    Does your plug-in pull all the posts FWP syndicates, but only displays the amount that you indicate? If so, doesn’t it defeat the purpose of limiting the posts if you’re just going to load up your DB with hidden post content? If that’s not the intended functionality, what do you think could be wrong?

    Thank you for your help.

  18. randy says:

    Can’t activate plugin because it triggers a fatal error:

    Parse error: syntax error, unexpected TFUNCTION in /home1/stratfe7/publichtml/wp-content/plugins/fwp-limit-posts-by-date-master/fwp-limit-posts-by-date.php on line 21

    Using latest version on WP 3.5.2 Already installed and activated FeedWordPress, FWP+ Add Attribution, FWP+ Reuters News Consumer

    Please advise. Thanks!

Post a reply

Posting comments

This form is for public comments. Consult About: Comments for policies and copyright details.

You can register for an account and sign in to verify your identity and avoid spam traps.

Formatting Comments

Use Markdown syntax for formatting.

  • *emphasis* = emphasis
  • **strong em** = strong em
  • [link]( = link
  • `[_no_](format)` = [_no_](format)

Code blocks should be indented with four or more spaces at the start of each line:

    function _foo ($_bar) {
        return $_bar;
    } /* foo() */
Your e-mail address will not be published.
Reply to Kyle