简体   繁体   English

Wordpress:在 RSS2 提要中包含分页信息?

[英]Wordpress: Including Pagination info in RSS2 feed?

I am coding a Java servlet that reads in a wordpress rss2 feed.我正在编写一个读取 wordpress rss2 提要的 Java servlet。 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?)在这里没有使用 wordpress 主题,所以分页插件不起作用(我对这个假设有误吗?)

All i want to implement is read in Rs22 posts and paginate at Java layer.我想要实现的只是阅读 Rs22 帖子并在 Java 层分页。

So is there a way where I can get number of posts and post #s itself in Rss2?那么有没有一种方法可以让我获得帖子数量并在 Rss2 中发布#s 本身?

I have a fixed number of posts per page (6)我每页有固定数量的帖子 (6)

You can add '?paged=2' to the feed URL to retrieve the second page of posts.您可以将 '?paged=2' 添加到提要 URL 以检索帖子的第二页。 The default posts it reads is configured in the Wordpress Dashboard > Settings > Reading > Syndication feeds show the most recent > Set the number它读取的默认帖子在 Wordpress 仪表板 > 设置 > 阅读 > 联合提要显示最新 > 设置数字中配置

So your URL might look like: http:/www.domain.com/feed?paged=2所以你的 URL 可能看起来像: http:/www.domain.com/feed?paged=2

To get the number of posts and post IDs you could run a query on the database.要获取帖子数量和帖子 ID,您可以在数据库上运行查询。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM