WordPress 自定义存档页面类型
我从 wordpress (来自 drupal 背景)开始,并试图找出如何创建新的“菜单”或 url 模式。不太清楚 WordPress 中的行话是什么,所以我在网上搜索它时遇到了一些麻烦。
当前存档允许您按以下方式排序:/post/date/2010/06
我想做的是扩展存档功能以包含“天”。 IE。 /post/date/2010/06/22
我不介意为此目的创建一个新的页面类型,例如 /archive/YYYY/MM/DD 或类似的内容。
不确定从哪里开始将“url 模式”与“url 处理程序”函数或模板进行匹配。
i'm starting with wordpress (from a drupal background) and trying to figure out how to create a new "menu" or url pattern. not quite sure what the lingo is in wordpress so im having a little trouble searching online for it.
the current archive allows you to sort by: /post/date/2010/06
what i'm trying to do is extend the archive functionality to include a "day" as well.
ie. /post/date/2010/06/22
i dont mind creating a new page type for this purpose such as /archive/YYYY/MM/DD or something like that.
not sure where to begin with matching the "url pattern" to the "url handler" function or template.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我最终使用:
它给了我一个链接的存档列表,这些链接直接指向我需要的页面。
该存档已经支持按天过滤,所以我只需要找到一种访问它的方法。
url 模式为 /post/yyyy/mm/dd
如果有人有兴趣生成直接指向该页面的链接,请使用:
I ended up using:
It gave me an archival list of links which point directly to the pages I needed.
The archive already supported filtering by day, so I just needed to find a way to access it.
The url pattern is /post/yyyy/mm/dd
If anyone is interested in generating a link directly to that page, use:
WordPress 可以自定义您在管理页面的“设置/永久链接”选项卡上使用的永久链接的样式。听起来您想要类似
/%year%/%monthnum%/%day%/%postname%
的内容,它应该允许您按年、年/月和年/月/日期进行分组。Wordpress can customize the style of permalinks you use on the Settings/Permalinks tab of your administrative page. It sounds like you want something like
/%year%/%monthnum%/%day%/%postname%
, which should allow you to group by year, year/month, and year/month/date.