3

I am coding a Java servlet that reads in a wordpress rss2 feed. What are the approaches I need to look at implementing pagination? not using wordpress themes here so, the pagination plugin wont work (am i wrong with this assumption?)

All i want to implement is read in Rs22 posts and paginate at Java layer.

So is there a way where I can get number of posts and post #s itself in Rss2?

I have a fixed number of posts per page (6)

Satish
  • 6,457
  • 8
  • 43
  • 63

1 Answers1

4

You can add '?paged=2' to the feed URL to retrieve the second page of posts. The default posts it reads is configured in the Wordpress Dashboard > Settings > Reading > Syndication feeds show the most recent > Set the number

So your URL might look like: http:/www.domain.com/feed?paged=2

To get the number of posts and post IDs you could run a query on the database.

anuragbh
  • 603
  • 1
  • 5
  • 11
  • 1
    As per Wordpress 3.5, Query String parameter `paged=2` is incorrect. It will result `404 Page Not Found` – Raptor Jul 29 '13 at 09:17
  • @Raptor - I've seen it work on the `www.example.com/feed/atom` feed (not the default RSS2), but then the `example.wordpress.com/comments/feed/atom` does not paginate (shows the last 5 posts - I guess configurable by the blog owner, regardless of the argument). – Tomasz Gandor Jun 16 '15 at 09:56